com php-src: Fixed possible incorrect "mark" usage: ext/pcre/php_pcre.c

From: Date: Tue, 09 Jan 2018 07:30:00 +0000
Subject: com php-src: Fixed possible incorrect "mark" usage: ext/pcre/php_pcre.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-100812@lists.php.net to get a copy of this message
Commit: cfee682802a93540c3533d404a740efbccbf66c2 Author: Dmitry Stogov <dmitry@zend.com> Tue, 9 Jan 2018 10:30:00 +0300 Parents: fc6a9908911697c48da9810e1fca965f61694fc2 Branches: PHP-7.2 master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=cfee682802a93540c3533d404a740efbccbf66c2 Log: Fixed possible incorrect "mark" usage Changed paths: M ext/pcre/php_pcre.c Diff: diff --git a/ext/pcre/php_pcre.c b/ext/pcre/php_pcre.c index 64b7077..4cdd8bf 100644 --- a/ext/pcre/php_pcre.c +++ b/ext/pcre/php_pcre.c @@ -1684,6 +1684,11 @@ static zend_string *php_pcre_replace_func_impl(pcre_cache_entry *pce, zend_strin advance to the next character. */ g_notempty = (start_offset == offsets[0]) ? PCRE_NOTEMPTY_ATSTART | PCRE_ANCHORED : 0; +#ifdef PCRE_EXTRA_MARK + /* replace function may use the same regex recursively */ + extra->mark = &mark; + extra->flags |= PCRE_EXTRA_MARK; +#endif } else if (count == PCRE_ERROR_NOMATCH || limit == 0) { /* If we previously set PCRE_NOTEMPTY_ATSTART after a null match, this is not necessarily the end. We need to advance

« previous php.cvs (#100812) next »