diff options
author | Daniel Veillard <veillard@redhat.com> | 2014-07-14 20:29:34 +0800 |
---|---|---|
committer | Daniel Veillard <veillard@redhat.com> | 2014-07-14 20:29:34 +0800 |
commit | a6ea72ad192f4209b5073e39358ce15f3f1dca4b (patch) | |
tree | d58fbecacb8bcf0e4f82d20440d7433613506927 | |
parent | 23243301a68ac56cc5dbfdcf2271589bd46fa71c (diff) | |
download | libxml2-a6ea72ad192f4209b5073e39358ce15f3f1dca4b.tar.gz |
Fix processing in SAX2 in case of an allocation failure
Related to https://bugzilla.gnome.org/show_bug.cgi?id=731360
-rw-r--r-- | SAX2.c | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -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)) { |