Skip to content

Commit e53dd02

Browse files
committed
Reset utf8_invalid in json scanner
1 parent f5b4cb7 commit e53dd02

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

ext/json/json_scanner.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -292,6 +292,7 @@ int php_json_scan(php_json_scanner *s)
292292
{
293293
s->str_start = s->cursor;
294294
s->str_esc = 0;
295+
s->utf8_invalid = 0;
295296
s->utf8_invalid_count = 0;
296297
PHP_JSON_CONDITION_SET_AND_GOTO(STR_P1);
297298
}

ext/json/json_scanner.re

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -209,6 +209,7 @@ std:
209209
<JS>["] {
210210
s->str_start = s->cursor;
211211
s->str_esc = 0;
212+
s->utf8_invalid = 0;
212213
s->utf8_invalid_count = 0;
213214
PHP_JSON_CONDITION_SET_AND_GOTO(STR_P1);
214215
}

0 commit comments

Comments
 (0)