summaryrefslogtreecommitdiff
path: root/textproc
diff options
context:
space:
mode:
authordrochner <drochner@pkgsrc.org>2012-01-17 14:43:43 +0000
committerdrochner <drochner@pkgsrc.org>2012-01-17 14:43:43 +0000
commit341021726e75e35d864368ceb7b1535af1836e7c (patch)
tree6523d04b32023262cf02f7671ff0192faad9ab71 /textproc
parent7bd81ccb5fd881d383728fbdd566f4761da525ef (diff)
downloadpkgsrc-341021726e75e35d864368ceb7b1535af1836e7c.tar.gz
add patch from upstream to fix potential DOS problem (CVE-2011-3905)
bump PKGREV
Diffstat (limited to 'textproc')
-rw-r--r--textproc/libxml2/Makefile4
-rw-r--r--textproc/libxml2/distinfo4
-rw-r--r--textproc/libxml2/patches/patch-al56
3 files changed, 57 insertions, 7 deletions
diff --git a/textproc/libxml2/Makefile b/textproc/libxml2/Makefile
index 13447a230a9..f1c668bba4d 100644
--- a/textproc/libxml2/Makefile
+++ b/textproc/libxml2/Makefile
@@ -1,7 +1,7 @@
-# $NetBSD: Makefile,v 1.111 2012/01/12 11:25:10 drochner Exp $
+# $NetBSD: Makefile,v 1.112 2012/01/17 14:43:43 drochner Exp $
DISTNAME= libxml2-2.7.8
-PKGREVISION= 5
+PKGREVISION= 6
CATEGORIES= textproc
MASTER_SITES= ftp://xmlsoft.org/libxml2/ \
http://xmlsoft.org/sources/
diff --git a/textproc/libxml2/distinfo b/textproc/libxml2/distinfo
index 08e7703cae6..9e1227d902f 100644
--- a/textproc/libxml2/distinfo
+++ b/textproc/libxml2/distinfo
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.85 2012/01/12 11:25:10 drochner Exp $
+$NetBSD: distinfo,v 1.86 2012/01/17 14:43:43 drochner Exp $
SHA1 (libxml2-2.7.8.tar.gz) = 859dd535edbb851cc15b64740ee06551a7a17d40
RMD160 (libxml2-2.7.8.tar.gz) = 30709622cfe3e2175e73d6701b7e19a25ab5ac47
@@ -11,6 +11,6 @@ SHA1 (patch-ae) = b8d8e0275cab3caafd98275ac22b63951fc4b5fd
SHA1 (patch-ag) = ab4aeeb8ca696b88285274760ab3ef08800773a0
SHA1 (patch-aj) = 24eb4a08ea4c40be6d75a72cd0bb5280514f73d4
SHA1 (patch-ak) = 5e0e9807d7ae0bc93a5583a61bb88a49ec1751e8
-SHA1 (patch-al) = a52bde60a5f42758036639f069df64e8ff7e4b11
+SHA1 (patch-al) = 45f984fef5cf5d04c46e940867707897396a9c9f
SHA1 (patch-include_libxml_xpath.h) = 3fc74551a7843668cf9ffee19b1f20ccb674e153
SHA1 (patch-xpointer.c) = fa720fd515bab3f99bb11bf56320b3ad8e5fb211
diff --git a/textproc/libxml2/patches/patch-al b/textproc/libxml2/patches/patch-al
index 6e6250b86c9..41a55634147 100644
--- a/textproc/libxml2/patches/patch-al
+++ b/textproc/libxml2/patches/patch-al
@@ -1,10 +1,11 @@
-$NetBSD: patch-al,v 1.2 2012/01/12 11:25:10 drochner Exp $
+$NetBSD: patch-al,v 1.3 2012/01/17 14:43:44 drochner Exp $
-from gnome git: Fix some potential problems on reallocation failures
-CVE-2011-3919
-from gnome git: Fix memory corruption
+-CVE-2011-3905
---- parser.c.orig 2010-11-04 15:55:45.000000000 +0000
+--- parser.c.orig 2012-01-17 10:21:47.000000000 +0000
+++ parser.c
@@ -1819,15 +1819,14 @@ namePush(xmlParserCtxtPtr ctxt, const xm
@@ -33,7 +34,27 @@ $NetBSD: patch-al,v 1.2 2012/01/12 11:25:10 drochner Exp $
}
for (;i > 0;i--)
buffer[nbchars++] = *cur++;
-@@ -6992,6 +6991,7 @@ xmlParseReference(xmlParserCtxtPtr ctxt)
+@@ -4949,7 +4948,8 @@ xmlParsePI(xmlParserCtxtPtr ctxt) {
+ (ctxt->sax->processingInstruction != NULL))
+ ctxt->sax->processingInstruction(ctxt->userData,
+ target, NULL);
+- ctxt->instate = state;
++ if (ctxt->instate != XML_PARSER_EOF)
++ ctxt->instate = state;
+ return;
+ }
+ buf = (xmlChar *) xmlMallocAtomic(size * sizeof(xmlChar));
+@@ -5029,7 +5029,8 @@ xmlParsePI(xmlParserCtxtPtr ctxt) {
+ } else {
+ xmlFatalErr(ctxt, XML_ERR_PI_NOT_STARTED, NULL);
+ }
+- ctxt->instate = state;
++ if (ctxt->instate != XML_PARSER_EOF)
++ ctxt->instate = state;
+ }
+ }
+
+@@ -6992,6 +6993,7 @@ xmlParseReference(xmlParserCtxtPtr ctxt)
ent->owner = 1;
while (list != NULL) {
list->parent = (xmlNodePtr) ent;
@@ -41,3 +62,32 @@ $NetBSD: patch-al,v 1.2 2012/01/12 11:25:10 drochner Exp $
if (list->next == NULL)
ent->last = list;
list = list->next;
+@@ -9588,6 +9590,8 @@ xmlParseElement(xmlParserCtxtPtr ctxt) {
+ else
+ name = xmlParseStartTag(ctxt);
+ #endif /* LIBXML_SAX1_ENABLED */
++ if (ctxt->instate == XML_PARSER_EOF)
++ return;
+ if (name == NULL) {
+ spacePop(ctxt);
+ return;
+@@ -10967,6 +10971,8 @@ xmlParseTryOrFinish(xmlParserCtxtPtr ctx
+ else
+ name = xmlParseStartTag(ctxt);
+ #endif /* LIBXML_SAX1_ENABLED */
++ if (ctxt->instate == XML_PARSER_EOF)
++ goto done;
+ if (name == NULL) {
+ spacePop(ctxt);
+ ctxt->instate = XML_PARSER_EOF;
+@@ -11153,7 +11159,9 @@ xmlParseTryOrFinish(xmlParserCtxtPtr ctx
+ else
+ xmlParseEndTag1(ctxt, 0);
+ #endif /* LIBXML_SAX1_ENABLED */
+- if (ctxt->nameNr == 0) {
++ if (ctxt->instate == XML_PARSER_EOF) {
++ /* Nothing */
++ } else if (ctxt->nameNr == 0) {
+ ctxt->instate = XML_PARSER_EPILOG;
+ } else {
+ ctxt->instate = XML_PARSER_CONTENT;