summary refs log tree commit diff
path: root/gnu/packages/patches/libxml2-id-attrs-in-xmlSetTreeDoc.patch
diff options
context:
space:
mode:
authorMark H Weaver <mhw@netris.org>2015-11-15 14:16:57 -0500
committerMark H Weaver <mhw@netris.org>2015-11-18 17:47:40 -0500
commitee6bb0cc763507b165674dbe03c6ae5d26c8da5c (patch)
tree34c4d1d29b5428f83113af81bc4464b432669c85 /gnu/packages/patches/libxml2-id-attrs-in-xmlSetTreeDoc.patch
parent328a14e869c01ae4e33120a08a5d60c719263684 (diff)
downloadguix-ee6bb0cc763507b165674dbe03c6ae5d26c8da5c.tar.gz
gnu: libxml2: Add fixes for CVE-2015-{1819,7941,7942,8035} and other bugs.
* gnu/packages/patches/libxml2-CVE-2015-1819.patch,
  gnu/packages/patches/libxml2-CVE-2015-7941-pt1.patch,
  gnu/packages/patches/libxml2-CVE-2015-7941-pt2.patch,
  gnu/packages/patches/libxml2-CVE-2015-7942-pt1.patch,
  gnu/packages/patches/libxml2-CVE-2015-7942-pt2.patch,
  gnu/packages/patches/libxml2-CVE-2015-8035.patch,
  gnu/packages/patches/libxml2-bug-737840.patch,
  gnu/packages/patches/libxml2-bug-738805.patch,
  gnu/packages/patches/libxml2-bug-746048.patch,
  gnu/packages/patches/libxml2-bug-747437.patch,
  gnu/packages/patches/libxml2-bug-751603.patch,
  gnu/packages/patches/libxml2-bug-751631.patch,
  gnu/packages/patches/libxml2-bug-754946.patch,
  gnu/packages/patches/libxml2-bug-754947.patch,
  gnu/packages/patches/libxml2-bug-755857.patch,
  gnu/packages/patches/libxml2-fix-catalog-corruption.patch,
  gnu/packages/patches/libxml2-id-attrs-in-xmlSetTreeDoc.patch,
  gnu/packages/patches/libxml2-node-sort-order-pt1.patch,
  gnu/packages/patches/libxml2-node-sort-order-pt2.patch: New files.
* gnu-system.am (dist_patch_DATA): Add them.
* gnu/packages/xml.scm (libxml2)[source]: Add patches.
Diffstat (limited to 'gnu/packages/patches/libxml2-id-attrs-in-xmlSetTreeDoc.patch')
-rw-r--r--gnu/packages/patches/libxml2-id-attrs-in-xmlSetTreeDoc.patch36
1 files changed, 36 insertions, 0 deletions
diff --git a/gnu/packages/patches/libxml2-id-attrs-in-xmlSetTreeDoc.patch b/gnu/packages/patches/libxml2-id-attrs-in-xmlSetTreeDoc.patch
new file mode 100644
index 0000000000..a87f79bf84
--- /dev/null
+++ b/gnu/packages/patches/libxml2-id-attrs-in-xmlSetTreeDoc.patch
@@ -0,0 +1,36 @@
+From f54d6a929af2a570396f0595a0e29064c908c12e Mon Sep 17 00:00:00 2001
+From: Nick Wellnhofer <wellnhofer@aevum.de>
+Date: Fri, 19 Dec 2014 00:08:35 +0100
+Subject: [PATCH] Account for ID attributes in xmlSetTreeDoc
+
+---
+ tree.c | 11 +++++++++++
+ 1 file changed, 11 insertions(+)
+
+diff --git a/tree.c b/tree.c
+index 6ec9223..c6323b4 100644
+--- a/tree.c
++++ b/tree.c
+@@ -2799,8 +2799,19 @@ xmlSetTreeDoc(xmlNodePtr tree, xmlDocPtr doc) {
+ 	if(tree->type == XML_ELEMENT_NODE) {
+ 	    prop = tree->properties;
+ 	    while (prop != NULL) {
++                if (prop->atype == XML_ATTRIBUTE_ID) {
++                    xmlRemoveID(tree->doc, prop);
++                }
++
+ 		prop->doc = doc;
+ 		xmlSetListDoc(prop->children, doc);
++
++                if (xmlIsID(doc, tree, prop)) {
++                    xmlChar *idVal = xmlNodeListGetString(doc, prop->children,
++                                                          1);
++                    xmlAddID(NULL, doc, idVal, prop);
++                }
++
+ 		prop = prop->next;
+ 	    }
+ 	}
+-- 
+2.6.3
+