From: Jakub Zelenka Date: Thu, 10 Aug 2017 18:47:58 +0000 (+0100) Subject: Reset utf8_invalid in json scanner X-Git-Tag: php-7.2.0beta3~24 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=e53dd027c51368ade5b65e8b18143c488f7871d8;p=php Reset utf8_invalid in json scanner --- diff --git a/ext/json/json_scanner.c b/ext/json/json_scanner.c index 5bc4416e95..21df55ccfc 100644 --- a/ext/json/json_scanner.c +++ b/ext/json/json_scanner.c @@ -292,6 +292,7 @@ yy14: { s->str_start = s->cursor; s->str_esc = 0; + s->utf8_invalid = 0; s->utf8_invalid_count = 0; PHP_JSON_CONDITION_SET_AND_GOTO(STR_P1); } diff --git a/ext/json/json_scanner.re b/ext/json/json_scanner.re index 9d52307be9..e10d1f23f6 100644 --- a/ext/json/json_scanner.re +++ b/ext/json/json_scanner.re @@ -209,6 +209,7 @@ std: ["] { s->str_start = s->cursor; s->str_esc = 0; + s->utf8_invalid = 0; s->utf8_invalid_count = 0; PHP_JSON_CONDITION_SET_AND_GOTO(STR_P1); }