com php-src: Fixed segfault in ext/standard/tests/strings/bug24208.php: ext/standard/string.c

From: Date: Sat, 22 Feb 2014 12:19:12 +0000
Subject: com php-src: Fixed segfault in ext/standard/tests/strings/bug24208.php: ext/standard/string.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-77982@lists.php.net to get a copy of this message
Commit: b1fb93b4822b68f7ef1e8f59bc1b3d7630212715 Author: Xinchen Hui <laruence@gmail.com> Sat, 22 Feb 2014 20:19:12 +0800 Parents: 3cf418c50a0deff949895c07661afbc24c4df4cc Branches: phpng Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=b1fb93b4822b68f7ef1e8f59bc1b3d7630212715 Log: Fixed segfault in ext/standard/tests/strings/bug24208.php it still ugly,, maybe we should make EG(active_symbol_table) a zend_array? Bugs: https://bugs.php.net/24208 Changed paths: M ext/standard/string.c Diff: diff --git a/ext/standard/string.c b/ext/standard/string.c index 8aa0d59..7598394 100644 --- a/ext/standard/string.c +++ b/ext/standard/string.c @@ -4443,7 +4443,11 @@ PHP_FUNCTION(parse_str) zend_rebuild_symbol_table(TSRMLS_C); } //??? Z_ARRVAL(tmp) = EG(active_symbol_table); + array_init(&tmp); + zend_hash_copy(Z_ARRVAL(tmp), EG(active_symbol_table), zval_add_ref); sapi_module.treat_data(PARSE_STRING, res, &tmp TSRMLS_CC); + zend_hash_copy(EG(active_symbol_table), Z_ARRVAL(tmp), zval_add_ref); + zval_dtor(&tmp); } else { zval ret;

« previous php.cvs (#77982) next »