From 631da59b5032cee29081c4a053dc002716769d24 Mon Sep 17 00:00:00 2001 From: Dmitry Stogov Date: Tue, 11 Oct 2005 06:47:48 +0000 Subject: Fixed bug #34790 (preg_match_all(), named capturing groups, variable assignment/return => crash) --- ext/pcre/php_pcre.c | 1 + 1 file changed, 1 insertion(+) (limited to 'ext/pcre/php_pcre.c') diff --git a/ext/pcre/php_pcre.c b/ext/pcre/php_pcre.c index ea539803e1..6b45187345 100644 --- a/ext/pcre/php_pcre.c +++ b/ext/pcre/php_pcre.c @@ -620,6 +620,7 @@ static void php_pcre_match(INTERNAL_FUNCTION_PARAMETERS, int global) if (subpat_names[i]) { zend_hash_update(Z_ARRVAL_P(subpats), subpat_names[i], strlen(subpat_names[i])+1, &match_sets[i], sizeof(zval *), NULL); + ZVAL_ADDREF(match_sets[i]); } zend_hash_next_index_insert(Z_ARRVAL_P(subpats), &match_sets[i], sizeof(zval *), NULL); } -- cgit v1.2.1