iliaa Wed Jul 28 20:35:09 2004 EDT
Modified files:
/php-src/ext/standard array.c
Log:
Fixed but #29437 (Possible crash inside array_walk_recursive()).
http://cvs.php.net/diff.php/php-src/ext/standard/array.c?r1=1.269&r2=1.270&ty=u
Index: php-src/ext/standard/array.c
diff -u php-src/ext/standard/array.c:1.269 php-src/ext/standard/array.c:1.270
--- php-src/ext/standard/array.c:1.269 Mon Jul 26 02:32:54 2004
+++ php-src/ext/standard/array.c Wed Jul 28 20:35:07 2004
@@ -21,7 +21,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: array.c,v 1.269 2004/07/26 06:32:54 andrey Exp $ */
+/* $Id: array.c,v 1.270 2004/07/29 00:35:07 iliaa Exp $ */
#include "php.h"
#include "php_ini.h"
@@ -996,7 +996,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;
@@ -1060,7 +1060,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