iliaa Tue May 6 18:03:52 2008 UTC Modified files: (Branch: PHP_5_2) /php-src/ext/standard basic_functions.c /php-src NEWS Log: MFB: Fixed bug #44836 (putenv() crashes, avoid direct reference of environ in POSIX systems). http://cvs.php.net/viewvc.cgi/php-src/ext/standard/basic_functions.c?r1=1.725.2.31.2.69&r2=1.725.2.31.2.70&diff_format=u Index: php-src/ext/standard/basic_functions.c diff -u php-src/ext/standard/basic_functions.c:1.725.2.31.2.69 php-src/ext/standard/basic_functions.c:1.725.2.31.2.70 --- php-src/ext/standard/basic_functions.c:1.725.2.31.2.69 Thu Mar 20 00:55:26 2008 +++ php-src/ext/standard/basic_functions.c Tue May 6 18:03:51 2008 @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: basic_functions.c,v 1.725.2.31.2.69 2008/03/20 00:55:26 dsp Exp $ */ +/* $Id: basic_functions.c,v 1.725.2.31.2.70 2008/05/06 18:03:51 iliaa Exp $ */ #include "php.h" #include "php_streams.h" @@ -3859,9 +3859,7 @@ SetEnvironmentVariable(pe->key, "bugbug"); #endif putenv(pe->previous_value); -# if defined(PHP_WIN32) efree(pe->previous_value); -# endif } else { # if HAVE_UNSETENV unsetenv(pe->key); @@ -4461,12 +4459,8 @@ pe.previous_value = NULL; for (env = environ; env != NULL && *env != NULL; env++) { if (!strncmp(*env, pe.key, pe.key_len) && (*env)[pe.key_len] == '=') { /* found it */ -#if defined(PHP_WIN32) - /* must copy previous value because MSVCRT's putenv can free the string without notice */ + /* must copy previous value because putenv can free the string without notice */ pe.previous_value = estrdup(*env); -#else - pe.previous_value = *env; -#endif break; } } http://cvs.php.net/viewvc.cgi/php-src/NEWS?r1=1.2027.2.547.2.1151&r2=1.2027.2.547.2.1152&diff_format=u Index: php-src/NEWS diff -u php-src/NEWS:1.2027.2.547.2.1151 php-src/NEWS:1.2027.2.547.2.1152 --- php-src/NEWS:1.2027.2.547.2.1151 Mon May 5 23:00:12 2008 +++ php-src/NEWS Tue May 6 18:03:52 2008 @@ -5,8 +5,11 @@ functions. (Andrey) - Fixed bug #44891 Memory leak using registerPHPFunctions and XSLT Variable as function parameter. (Rob) +- Fixed bug #44836 (putenv() crashes, avoid direct reference of environ in + POSIX systems). (Ilia, delphij at FreeBSD dot org) - Fixed bug #44798 (Memory leak assigning value to attribute). (Ilia) + 01 May 2008, PHP 5.2.6 - Fixed two possible crashes inside posix extension (Tony) - Fixed incorrect heredoc handling when label is used within the block.
-- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php