com php-src: Fixed segfault: ext/pcre/php_pcre.c
| From: | Dmitry Stogov | Date: | Wed, 19 Feb 2014 10:49:00 +0000 |
| Subject: | com php-src: Fixed segfault: ext/pcre/php_pcre.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-78035@lists.php.net to get a copy of this message | ||
Commit: 189a39a187c86b95551c342c5085b63ed34a4d3b
Author: Xinchen Hui <laruence@gmail.com> Wed, 19 Feb 2014 18:49:00 +0800
Parents: a28ce57bc5c26d610b15e6c4aca961966ff021b4
Branches: phpng
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=189a39a187c86b95551c342c5085b63ed34a4d3b
Log:
Fixed segfault
Changed paths:
M ext/pcre/php_pcre.c
Diff:
diff --git a/ext/pcre/php_pcre.c b/ext/pcre/php_pcre.c
index 473a189..7a74082 100644
--- a/ext/pcre/php_pcre.c
+++ b/ext/pcre/php_pcre.c
@@ -455,12 +455,7 @@ PHPAPI pcre_cache_entry* pcre_get_compiled_regex_cache(zend_string *regex
TSRMLS
* as hash keys especually for this table.
* See bug #63180
*/
- STR_ADDREF(regex);
-
- pce = zend_hash_update_mem(&PCRE_G(pcre_cache), regex, (void *)&new_entry,
- sizeof(pcre_cache_entry));
-
- STR_RELEASE(regex);
+ pce = zend_hash_str_update_mem(&PCRE_G(pcre_cache), regex->val, regex->len,
&new_entry, sizeof(pcre_cache_entry));
return pce;
}