Hi Ilia, On Wed, 2009-06-24 at 12:21 +0000, Ilia Alshanetsky wrote: > MFB: Fixed bug #48465 (sys_get_temp_dir() possibly inconsistent when using > TMPDIR).
First: I'd like to remind about what Lukas wrote as we planned to release 5.3.0 with as little source for trouble as possible: "If issues are found/fixed please send the patches to internals for review." Others didn't do that either but at least asked for review on IRC or private mail ... Would be nice if all could follow a stricter review process till 5.3 is tagged (see the mail Lukas will send in a few minutes to internals, too) Seondly: > @@ -200,7 +200,14 @@ > { > char* s = getenv("TMPDIR"); > if (s) { > - temporary_directory = strdup(s); > + int len = strlen(s); > + > + if (s[len - 1] == DEFAULT_SLASH) { > + temporary_directory = zend_strndup(s, len - 1); This seems to be broken in case TMPDIR="". johannes > + } else { > + temporary_directory = zend_strndup(s, len); > + } > + > return temporary_directory; > } > } > > > -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php