libxml2: add recipe for 2.7.8 version
authorMartin Jansa <Martin.Jansa@gmail.com>
Thu, 18 Nov 2010 14:03:51 +0000 (15:03 +0100)
committerMartin Jansa <Martin.Jansa@gmail.com>
Fri, 19 Nov 2010 09:00:04 +0000 (10:00 +0100)
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
recipes/libxml/libxml2-2.7.8/0cbeb50ee03ce582a0c979c70d8fbf030e270c37.patch [new file with mode: 0644]
recipes/libxml/libxml2-2.7.8/df83c17e5a2646bd923f75e5e507bc80d73c9722.patch [new file with mode: 0644]
recipes/libxml/libxml2-2.7.8/fec31bcd452e77c10579467ca87a785b41115de6.patch [new file with mode: 0644]
recipes/libxml/libxml2_2.7.8.bb [new file with mode: 0644]

diff --git a/recipes/libxml/libxml2-2.7.8/0cbeb50ee03ce582a0c979c70d8fbf030e270c37.patch b/recipes/libxml/libxml2-2.7.8/0cbeb50ee03ce582a0c979c70d8fbf030e270c37.patch
new file mode 100644 (file)
index 0000000..f94350d
--- /dev/null
@@ -0,0 +1,29 @@
+From 0cbeb50ee03ce582a0c979c70d8fbf030e270c37 Mon Sep 17 00:00:00 2001
+From: Daniel Veillard <veillard@redhat.com>
+Date: Mon, 15 Nov 2010 11:06:29 +0000
+Subject: Fix a potential memory access error
+
+in case of a previus allocation error
+---
+diff --git a/xpath.c b/xpath.c
+index 4d6826d..81e33f6 100644
+--- a/xpath.c
++++ b/xpath.c
+@@ -3575,13 +3575,13 @@ xmlXPathNodeSetAdd(xmlNodeSetPtr cur, xmlNodePtr val) {
+     } else if (cur->nodeNr == cur->nodeMax) {
+         xmlNodePtr *temp;
+-        cur->nodeMax *= 2;
+-      temp = (xmlNodePtr *) xmlRealloc(cur->nodeTab, cur->nodeMax *
++      temp = (xmlNodePtr *) xmlRealloc(cur->nodeTab, cur->nodeMax * 2 *
+                                     sizeof(xmlNodePtr));
+       if (temp == NULL) {
+           xmlXPathErrMemory(NULL, "growing nodeset\n");
+           return;
+       }
++        cur->nodeMax *= 2;
+       cur->nodeTab = temp;
+     }
+     if (val->type == XML_NAMESPACE_DECL) {
+--
+cgit v0.8.3.1
diff --git a/recipes/libxml/libxml2-2.7.8/df83c17e5a2646bd923f75e5e507bc80d73c9722.patch b/recipes/libxml/libxml2-2.7.8/df83c17e5a2646bd923f75e5e507bc80d73c9722.patch
new file mode 100644 (file)
index 0000000..3509a48
--- /dev/null
@@ -0,0 +1,32 @@
+From df83c17e5a2646bd923f75e5e507bc80d73c9722 Mon Sep 17 00:00:00 2001
+From: Daniel Veillard <veillard@redhat.com>
+Date: Wed, 17 Nov 2010 13:12:14 +0000
+Subject: Fix a potential freeing error in XPath
+
+---
+diff --git a/xpath.c b/xpath.c
+index 81e33f6..1447be5 100644
+--- a/xpath.c
++++ b/xpath.c
+@@ -11763,11 +11763,15 @@ xmlXPathCompOpEvalPositionalPredicate(xmlXPathParserContextPtr ctxt,
+           if ((ctxt->error != XPATH_EXPRESSION_OK) || (res == -1)) {
+               xmlXPathObjectPtr tmp;
+-              /* pop the result */
++              /* pop the result if any */
+               tmp = valuePop(ctxt);
+-              xmlXPathReleaseObject(xpctxt, tmp);
+-              /* then pop off contextObj, which will be freed later */
+-              valuePop(ctxt);
++                if (tmp != contextObj)
++                    /*
++                     * Free up the result
++                     * then pop off contextObj, which will be freed later
++                     */
++                    xmlXPathReleaseObject(xpctxt, tmp);
++                    valuePop(ctxt);
+               goto evaluation_error;
+           }
+--
+cgit v0.8.3.1
diff --git a/recipes/libxml/libxml2-2.7.8/fec31bcd452e77c10579467ca87a785b41115de6.patch b/recipes/libxml/libxml2-2.7.8/fec31bcd452e77c10579467ca87a785b41115de6.patch
new file mode 100644 (file)
index 0000000..1705941
--- /dev/null
@@ -0,0 +1,28 @@
+From fec31bcd452e77c10579467ca87a785b41115de6 Mon Sep 17 00:00:00 2001
+From: Daniel Veillard <veillard@redhat.com>
+Date: Thu, 18 Nov 2010 10:07:24 +0000
+Subject: Small fix for previous commit
+
+---
+diff --git a/xpath.c b/xpath.c
+index 1447be5..8b56189 100644
+--- a/xpath.c
++++ b/xpath.c
+@@ -11765,13 +11765,14 @@ xmlXPathCompOpEvalPositionalPredicate(xmlXPathParserContextPtr ctxt,
+               xmlXPathObjectPtr tmp;
+               /* pop the result if any */
+               tmp = valuePop(ctxt);
+-                if (tmp != contextObj)
++                if (tmp != contextObj) {
+                     /*
+                      * Free up the result
+                      * then pop off contextObj, which will be freed later
+                      */
+                     xmlXPathReleaseObject(xpctxt, tmp);
+                     valuePop(ctxt);
++                }
+               goto evaluation_error;
+           }
+--
+cgit v0.8.3.1
diff --git a/recipes/libxml/libxml2_2.7.8.bb b/recipes/libxml/libxml2_2.7.8.bb
new file mode 100644 (file)
index 0000000..6b72e30
--- /dev/null
@@ -0,0 +1,12 @@
+require libxml2.inc
+
+SRC_URI += "\
+  file://0cbeb50ee03ce582a0c979c70d8fbf030e270c37.patch \
+  file://df83c17e5a2646bd923f75e5e507bc80d73c9722.patch \
+  file://fec31bcd452e77c10579467ca87a785b41115de6.patch \
+"
+
+PR = "${INC_PR}.0"
+
+SRC_URI[archive.md5sum] = "8127a65e8c3b08856093099b52599c86"
+SRC_URI[archive.sha256sum] = "cda23bc9ebd26474ca8f3d67e7d1c4a1f1e7106364b690d822e009fdc3c417ec"