From ca33a2b7aebf7cadd480a80d1eb2284406061b08 Mon Sep 17 00:00:00 2001 From: Nikias Bassen Date: Tue, 7 Feb 2017 02:37:59 +0100 Subject: xplist: Fix OOB read when parsing double quotes --- src/xplist.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/xplist.c b/src/xplist.c index f73b12d..7cee6de 100644 --- a/src/xplist.c +++ b/src/xplist.c @@ -469,6 +469,10 @@ static void find_next(parse_ctx ctx, const char *nextchars, int numchars, int sk if (skip_quotes && (*(ctx->pos) == '"')) { ctx->pos++; find_char(ctx, '"', 0); + if (ctx->pos >= ctx->end) { + PLIST_XML_ERR("EOF while looking for matching double quote\n"); + return; + } if (*(ctx->pos) != '"') { PLIST_XML_ERR("Unmatched double quote\n"); return; -- cgit v1.1-32-gdbae