From: Daniel Veillard Date: Mon, 14 Jul 2014 20:29:34 +0800 Subject: Fix processing in SAX2 in case of an allocation failure Related to https://bugzilla.gnome.org/show_bug.cgi?id=731360 --- SAX2.c | 1 + 1 file changed, 1 insertion(+) diff --git a/SAX2.c b/SAX2.c index 76b7158..791992c 100644 --- a/SAX2.c +++ b/SAX2.c @@ -2578,6 +2578,7 @@ xmlSAX2Characters(void *ctx, const xmlChar *ch, int len) } if (lastChild->content == NULL) { xmlSAX2ErrMemory(ctxt, "xmlSAX2Characters: xmlStrdup returned NULL"); + return; } if (((size_t)ctxt->nodelen + (size_t)len > XML_MAX_TEXT_LENGTH) && ((ctxt->options & XML_PARSE_HUGE) == 0)) {