diff options
| author | Ilia Alshanetsky <iliaa@php.net> | 2004-07-29 00:35:07 +0000 |
|---|---|---|
| committer | Ilia Alshanetsky <iliaa@php.net> | 2004-07-29 00:35:07 +0000 |
| commit | 739696d2d7531ffb24269263fb5396a728943794 (patch) | |
| tree | 9bad976b47028fe15bdee1546b82ecdd83ab4984 /ext | |
| parent | 65ae35729d980344eeec809440414f5629d2ae6a (diff) | |
| download | php-git-739696d2d7531ffb24269263fb5396a728943794.tar.gz | |
Fixed but #29437 (Possible crash inside array_walk_recursive()).
Diffstat (limited to 'ext')
| -rw-r--r-- | ext/standard/array.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/ext/standard/array.c b/ext/standard/array.c index 84625ca71c..5ee9796357 100644 --- a/ext/standard/array.c +++ b/ext/standard/array.c @@ -996,7 +996,7 @@ static int php_array_walk(HashTable *target_hash, zval **userdata, int recursive { 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 @@ static int php_array_walk(HashTable *target_hash, zval **userdata, int recursive } } - zval_ptr_dtor(&key); + if (key) { + zval_ptr_dtor(&key); + key = NULL; + } zend_hash_move_forward_ex(target_hash, &pos); } |
