Package: libxml2 / 2.9.1+dfsg1-5+deb8u6

0021-Fix-a-couple-of-missing-NULL-checks.patch Patch series | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
From: Gaurav <g.gupta@samsung.com>
Date: Fri, 29 Nov 2013 23:28:21 +0800
Subject: Fix a couple of missing NULL checks

For https://bugzilla.gnome.org/show_bug.cgi?id=708681
---
 tree.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/tree.c b/tree.c
index efc3ca2..43c3c57 100644
--- a/tree.c
+++ b/tree.c
@@ -4294,6 +4294,7 @@ xmlStaticCopyNodeList(xmlNodePtr node, xmlDocPtr doc, xmlNodePtr parent) {
 	    }
 	    if (doc->intSubset == NULL) {
 		q = (xmlNodePtr) xmlCopyDtd( (xmlDtdPtr) node );
+		if (q == NULL) return(NULL);
 		q->doc = doc;
 		q->parent = parent;
 		doc->intSubset = (xmlDtdPtr) q;
@@ -4305,6 +4306,7 @@ xmlStaticCopyNodeList(xmlNodePtr node, xmlDocPtr doc, xmlNodePtr parent) {
 	} else
 #endif /* LIBXML_TREE_ENABLED */
 	    q = xmlStaticCopyNode(node, doc, parent, 1);
+	if (q == NULL) return(NULL);
 	if (ret == NULL) {
 	    q->prev = NULL;
 	    ret = p = q;