diff options
| -rw-r--r-- | NEWS | 1 | ||||
| -rw-r--r-- | ext/standard/array.c | 8 |
2 files changed, 8 insertions, 1 deletions
@@ -20,6 +20,7 @@ PHP NEWS . Fixed bug #76367 (NoRewindIterator segfault 11). (Laruence) - Standard: + . Fixed bug #76410 (SIGV in zend_mm_alloc_small). (Laruence) . Fixed bug #76335 ("link(): Bad file descriptor" with non-ASCII path). (Anatol) diff --git a/ext/standard/array.c b/ext/standard/array.c index 382fb72beb..b3852619d6 100644 --- a/ext/standard/array.c +++ b/ext/standard/array.c @@ -2533,7 +2533,13 @@ PHP_FUNCTION(extract) count = php_extract_if_exists(Z_ARRVAL_P(var_array_param), symbol_table); break; case EXTR_OVERWRITE: - count = php_extract_overwrite(Z_ARRVAL_P(var_array_param), symbol_table); + { + zval zv; + /* The array might be stored in a local variable that will be overwritten */ + ZVAL_COPY(&zv, var_array_param); + count = php_extract_overwrite(Z_ARRVAL(zv), symbol_table); + zval_ptr_dtor(&zv); + } break; case EXTR_PREFIX_IF_EXISTS: count = php_extract_prefix_if_exists(Z_ARRVAL_P(var_array_param), symbol_table, prefix); |
