Bug #874: tempnam function does not support $TMPDIR overriding
| From: | bbonev at netage dot bg | Date: | Mon, 26 Oct 1998 08:11:00 +0000 |
| Subject: | Bug #874: tempnam function does not support $TMPDIR overriding | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-2021@lists.php.net to get a copy of this message | ||
From: bbonev@netage.bg
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@lists.php.net
For help: php-dev-help@lists.php.net