From: Nikita Popov Date: Thu, 22 Oct 2020 09:01:59 +0000 (+0200) Subject: Don't leak pcre error_code across requests X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=41b8cdd2e0ec4478166c577e6a4d6a9223094f71;p=php Don't leak pcre error_code across requests --- diff --git a/ext/pcre/php_pcre.c b/ext/pcre/php_pcre.c index ee340829ee..4a796062ec 100644 --- a/ext/pcre/php_pcre.c +++ b/ext/pcre/php_pcre.c @@ -486,6 +486,7 @@ static PHP_RINIT_FUNCTION(pcre) mdata_used = 0; #endif + PCRE_G(error_code) = PHP_PCRE_NO_ERROR; PCRE_G(gctx_zmm) = pcre2_general_context_create(php_pcre_emalloc, php_pcre_efree, NULL); if (!PCRE_G(gctx_zmm)) { return FAILURE;