summaryrefslogtreecommitdiff
path: root/ext/json/json_scanner.c
diff options
context:
space:
mode:
authorJakub Zelenka <bukka@php.net>2017-08-06 17:20:31 +0100
committerJakub Zelenka <bukka@php.net>2017-08-06 17:20:31 +0100
commit41d7621f48d78034755ccd540ade850eedc838c6 (patch)
treeafc0a31b656d046b5a9aa7369b658299f2e1ca20 /ext/json/json_scanner.c
parent6b73b2d6ebede318b5baa21ffae8aa3744762958 (diff)
downloadphp-git-41d7621f48d78034755ccd540ade850eedc838c6.tar.gz
Fix segfault in json ignoring of invalid UTF8
Diffstat (limited to 'ext/json/json_scanner.c')
-rw-r--r--ext/json/json_scanner.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/ext/json/json_scanner.c b/ext/json/json_scanner.c
index 462a99d013..786f3027d9 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_count = 0;
PHP_JSON_CONDITION_SET_AND_GOTO(STR_P1);
}
yy16: