tony2001                Mon May 12 08:47:29 2008 UTC

  Modified files:              (Branch: PHP_5_2)
    /php-src    NEWS 
    /php-src/ext/standard       basic_functions.c 
  Log:
  MFH: revert patch that causes invalid reads/crashes on Linux
  
  
http://cvs.php.net/viewvc.cgi/php-src/NEWS?r1=1.2027.2.547.2.1156&r2=1.2027.2.547.2.1157&diff_format=u
Index: php-src/NEWS
diff -u php-src/NEWS:1.2027.2.547.2.1156 php-src/NEWS:1.2027.2.547.2.1157
--- php-src/NEWS:1.2027.2.547.2.1156    Fri May  9 10:29:01 2008
+++ php-src/NEWS        Mon May 12 08:47:29 2008
@@ -5,8 +5,6 @@
   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 #44830 (Very minor issue with backslash in heredoc). (Matt)
 - Fixed bug #44811 (Improve error message when creating a new SoapClient that 
   contains invalid data). (Markus Fischer, David C)
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/basic_functions.c?r1=1.725.2.31.2.70&r2=1.725.2.31.2.71&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.70 
php-src/ext/standard/basic_functions.c:1.725.2.31.2.71
--- php-src/ext/standard/basic_functions.c:1.725.2.31.2.70      Tue May  6 
18:03:51 2008
+++ php-src/ext/standard/basic_functions.c      Mon May 12 08:47:29 2008
@@ -17,7 +17,7 @@
    +----------------------------------------------------------------------+
  */
 
-/* $Id: basic_functions.c,v 1.725.2.31.2.70 2008/05/06 18:03:51 iliaa Exp $ */
+/* $Id: basic_functions.c,v 1.725.2.31.2.71 2008/05/12 08:47:29 tony2001 Exp $ 
*/
 
 #include "php.h"
 #include "php_streams.h"
@@ -3859,7 +3859,9 @@
                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);
@@ -4459,8 +4461,12 @@
                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 */
-                               /* must copy previous value because putenv can 
free the string without notice */
+#if defined(PHP_WIN32)
+                               /* must copy previous value because MSVCRT's 
putenv can free the string without notice */
                                pe.previous_value = estrdup(*env);
+#else
+                               pe.previous_value = *env;
+#endif
                                break;
                        }
                }



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to