Re: cvs: php-src(PHP_5_3) /main php_open_temporary_file.c

From: Date: Wed, 24 Jun 2009 13:14:44 +0000
Subject: Re: cvs: php-src(PHP_5_3) /main php_open_temporary_file.c
References: 1  Groups: php.cvs 
Request: Send a blank email to php-cvs+get-58961@lists.php.net to get a copy of this message
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; > } > } > > >

« previous php.cvs (#58961) next »