pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/textproc/libxml2 add 3 patches from gnome git:



details:   https://anonhg.NetBSD.org/pkgsrc/rev/c43a86babce4
branches:  trunk
changeset: 583857:c43a86babce4
user:      drochner <drochner%pkgsrc.org@localhost>
date:      Mon Jan 03 12:17:43 2011 +0000

description:
add 3 patches from gnome git:
-fix realloc error handling bug
-fix potential double free (CVE-2010-4494 / SA42721)
bump PKGREVISION

diffstat:

 textproc/libxml2/Makefile         |   4 +-
 textproc/libxml2/distinfo         |   3 +-
 textproc/libxml2/patches/patch-ak |  45 +++++++++++++++++++++++++++++++++++++++
 3 files changed, 49 insertions(+), 3 deletions(-)

diffs (76 lines):

diff -r e09efe3a8b9d -r c43a86babce4 textproc/libxml2/Makefile
--- a/textproc/libxml2/Makefile Mon Jan 03 12:17:30 2011 +0000
+++ b/textproc/libxml2/Makefile Mon Jan 03 12:17:43 2011 +0000
@@ -1,7 +1,7 @@
-# $NetBSD: Makefile,v 1.106 2010/11/26 13:43:24 drochner Exp $
+# $NetBSD: Makefile,v 1.107 2011/01/03 12:17:43 drochner Exp $
 
 DISTNAME=      libxml2-2.7.8
-PKGREVISION=   1
+PKGREVISION=   2
 CATEGORIES=    textproc
 MASTER_SITES=  ftp://xmlsoft.org/libxml2/ \
                http://xmlsoft.org/sources/
diff -r e09efe3a8b9d -r c43a86babce4 textproc/libxml2/distinfo
--- a/textproc/libxml2/distinfo Mon Jan 03 12:17:30 2011 +0000
+++ b/textproc/libxml2/distinfo Mon Jan 03 12:17:43 2011 +0000
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.81 2010/11/26 13:43:24 drochner Exp $
+$NetBSD: distinfo,v 1.82 2011/01/03 12:17:43 drochner Exp $
 
 SHA1 (libxml2-2.7.8.tar.gz) = 859dd535edbb851cc15b64740ee06551a7a17d40
 RMD160 (libxml2-2.7.8.tar.gz) = 30709622cfe3e2175e73d6701b7e19a25ab5ac47
@@ -10,3 +10,4 @@
 SHA1 (patch-ae) = b8d8e0275cab3caafd98275ac22b63951fc4b5fd
 SHA1 (patch-ag) = 30ec5c8daece4aba75a02bbc13db5373542dea7b
 SHA1 (patch-aj) = 24eb4a08ea4c40be6d75a72cd0bb5280514f73d4
+SHA1 (patch-ak) = 7cec0f12a89087df91c0e1d84400a6b91df56211
diff -r e09efe3a8b9d -r c43a86babce4 textproc/libxml2/patches/patch-ak
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/textproc/libxml2/patches/patch-ak Mon Jan 03 12:17:43 2011 +0000
@@ -0,0 +1,45 @@
+$NetBSD: patch-ak,v 1.1 2011/01/03 12:17:43 drochner Exp $
+
+from gnome git:
+-fix realloc bug
+-fix CVE-2010-4494 / SA42721
+
+--- xpath.c.orig       2010-11-03 19:18:27.000000000 +0000
++++ xpath.c
+@@ -3575,13 +3575,13 @@ xmlXPathNodeSetAdd(xmlNodeSetPtr cur, xm
+     } 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) {
+@@ -11763,11 +11763,16 @@ xmlXPathCompOpEvalPositionalPredicate(xm
+ 
+           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;
+           }
+ 



Home | Main Index | Thread Index | Old Index