From: Christos Zoulas Date: Fri, 17 Aug 2018 09:12:33 +0000 (+0000) Subject: prevent overread (found by oss-fuzz) X-Git-Tag: FILE5_35~48 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=87f27958cfbb05d262504976f66db70c24d5061f;p=file prevent overread (found by oss-fuzz) --- diff --git a/src/is_json.c b/src/is_json.c index 5d4e8b90..527b26c4 100644 --- a/src/is_json.c +++ b/src/is_json.c @@ -32,7 +32,7 @@ #include "file.h" #ifndef lint -FILE_RCSID("@(#)$File: is_json.c,v 1.6 2018/08/13 12:59:05 christos Exp $") +FILE_RCSID("@(#)$File: is_json.c,v 1.7 2018/08/17 09:12:33 christos Exp $") #endif #include @@ -127,6 +127,8 @@ json_parse_string(const unsigned char **ucp, const unsigned char *ue) case '\0': goto out; case '\\': + if (uc == ue) + goto out; switch (*uc++) { case '\0': goto out;