blob: 73813e4bf858b4a184ddc56e613754bd723f6978 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
From: Daniel Veillard <veillard@redhat.com>
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)) {
|