]> granicus.if.org Git - php/commitdiff
Reset utf8_invalid in json scanner
authorJakub Zelenka <bukka@php.net>
Thu, 10 Aug 2017 18:47:58 +0000 (19:47 +0100)
committerJakub Zelenka <bukka@php.net>
Thu, 10 Aug 2017 18:47:58 +0000 (19:47 +0100)
ext/json/json_scanner.c
ext/json/json_scanner.re

index 5bc4416e95c8ebeb1c6bc6342e6fd27c6cec9c3a..21df55ccfce8dbbc52e5b83cedeabda73b3c9756 100644 (file)
@@ -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);
        }
index 9d52307be98db9f8bb17e9613d2bc1ae2946187c..e10d1f23f6a78cd5203529725d53d83452770fd8 100644 (file)
@@ -209,6 +209,7 @@ std:
        <JS>["]                  {
                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);
        }