summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDmitry Stogov <dmitry@zend.com>2014-11-07 09:48:26 +0300
committerDmitry Stogov <dmitry@zend.com>2014-11-07 09:48:26 +0300
commited4c0245c7ca51490ea10e2756076285560a5d88 (patch)
treeb98f1d7138f19783861c6b103d88f91d65774637
parent8fdc4d8797e176f9bb8d9f9509a45346478d9cc1 (diff)
parent9dfa843a386b65b18353c510f032e322004d0bb7 (diff)
downloadphp-git-ed4c0245c7ca51490ea10e2756076285560a5d88.tar.gz
Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4: Partial fix for bug #68365 (zend_mm_heap corrupted after memory overflow in zend_hash_copy)
-rw-r--r--Zend/zend_variables.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Zend/zend_variables.c b/Zend/zend_variables.c
index 9674de5246..cc73c379a7 100644
--- a/Zend/zend_variables.c
+++ b/Zend/zend_variables.c
@@ -135,9 +135,9 @@ ZEND_API void _zval_copy_ctor_func(zval *zvalue ZEND_FILE_LINE_DC)
}
ALLOC_HASHTABLE_REL(tmp_ht);
zend_hash_init(tmp_ht, zend_hash_num_elements(original_ht), NULL, ZVAL_PTR_DTOR, 0);
+ zvalue->value.ht = tmp_ht;
zend_hash_copy(tmp_ht, original_ht, (copy_ctor_func_t) zval_add_ref, (void *) &tmp, sizeof(zval *));
tmp_ht->nNextFreeElement = original_ht->nNextFreeElement;
- zvalue->value.ht = tmp_ht;
}
break;
case IS_OBJECT: