1
0
mirror of https://gitlab.gnome.org/GNOME/libxml2.git synced 2024-12-24 21:33:51 +03:00

Fix processing in SAX2 in case of an allocation failure

Related to https://bugzilla.gnome.org/show_bug.cgi?id=731360
This commit is contained in:
Daniel Veillard 2014-07-14 20:29:34 +08:00
parent 23243301a6
commit a6ea72ad19

1
SAX2.c
View File

@ -2580,6 +2580,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)) {