iliaa           Wed Jul 28 20:35:13 2004 EDT

  Modified files:              (Branch: PHP_5_0)
    /php-src    NEWS 
    /php-src/ext/standard       array.c 
  Log:
  MFH: Fixed but #29437 (Possible crash inside array_walk_recursive()).
  
  
http://cvs.php.net/diff.php/php-src/NEWS?r1=1.1760.2.14&r2=1.1760.2.15&ty=u
Index: php-src/NEWS
diff -u php-src/NEWS:1.1760.2.14 php-src/NEWS:1.1760.2.15
--- php-src/NEWS:1.1760.2.14    Wed Jul 28 20:17:01 2004
+++ php-src/NEWS        Wed Jul 28 20:35:11 2004
@@ -2,6 +2,7 @@
 |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
 ?? ??? 2004, PHP 5.0.1
 - Improved and moved ActiveScript SAPI to PECL.  (Wez)
+- Fixed but #29437 (Possible crash inside array_walk_recursive()). (Ilia)
 - Fixed bug #29431 (crash when parsing invalid address; invalid address
   returned by stream_socket_recvfrom(), stream_socket_getname()). (Wez)
 - Fixed bug #29409 (Segfault in PHP functions called from XSLT). (Rob)
http://cvs.php.net/diff.php/php-src/ext/standard/array.c?r1=1.266&r2=1.266.2.1&ty=u
Index: php-src/ext/standard/array.c
diff -u php-src/ext/standard/array.c:1.266 php-src/ext/standard/array.c:1.266.2.1
--- php-src/ext/standard/array.c:1.266  Sun Jul 11 17:15:04 2004
+++ php-src/ext/standard/array.c        Wed Jul 28 20:35:12 2004
@@ -21,7 +21,7 @@
    +----------------------------------------------------------------------+
 */
 
-/* $Id: array.c,v 1.266 2004/07/11 21:15:04 andrey Exp $ */
+/* $Id: array.c,v 1.266.2.1 2004/07/29 00:35:12 iliaa Exp $ */
 
 #include "php.h"
 #include "php_ini.h"
@@ -994,7 +994,7 @@
 {
        zval **args[3],                 /* Arguments to userland function */
                  *retval_ptr,                  /* Return value - unused */
-                 *key;                         /* Entry key */
+                 *key=NULL;                            /* Entry key */
        char  *string_key;
        uint   string_key_len;
        ulong  num_key;
@@ -1058,7 +1058,10 @@
                        }
                }
 
-               zval_ptr_dtor(&key);
+               if (key) {
+                       zval_ptr_dtor(&key);
+                       key = NULL;
+               }
                zend_hash_move_forward_ex(target_hash, &pos);
        }
        

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

Reply via email to