[PHP-DEV] Bug #874: tempnam function does not support $TMPDIR overriding From: bbonev <email protected>
Date: 10/26/98

From: bbonev <email protected>
Operating system: Linux 2.0.34
PHP version: 3.0.5
PHP Bug Type: Misbehaving function
Bug description: tempnam function does not support $TMPDIR overriding

in file.c:
-------
        if (f = getenv("TMPDIR")) {
                (void)snprintf(name, MAXPATHLEN, "%s%s%sXXXXXX", f,
                                           *(f + strlen(f) - 1) == '/'? "": "/",
 pfx);
                if (f = mktemp(name))
                        return(f);
        }

        if (f = (char *)dir) {
--------
solution: swap getenv("TMPDIR") and (char*)dir :-))

--
PHP Development Mailing List   http://www.php.net/
To unsubscribe send an empty message to php-dev-unsubscribe <email protected>
For help: php-dev-help <email protected>