From 8c5eae9847edc1e65ba70bb76e042bccfee555c4 Mon Sep 17 00:00:00 2001 From: Nikias Bassen Date: Tue, 7 Feb 2017 02:27:03 +0100 Subject: xplist: Fix OOB read when parsing node text content --- src/xplist.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/xplist.c b/src/xplist.c index 0e8b7e6..f73b12d 100644 --- a/src/xplist.c +++ b/src/xplist.c @@ -528,7 +528,7 @@ static text_part_t* get_text_parts(parse_ctx ctx, const char* tag, size_t tag_le do { p = ctx->pos; find_char(ctx, '<', 0); - if (*ctx->pos != '<') { + if (ctx->pos >= ctx->end || *ctx->pos != '<') { PLIST_XML_ERR("EOF while looking for closing tag\n"); ctx->err++; return NULL; -- cgit v1.1-32-gdbae