summaryrefslogtreecommitdiffstats
path: root/textproc
diff options
context:
space:
mode:
authorahze <ahze@df743ca5-7f9a-e211-a948-0013205c9059>2012-01-24 09:15:19 +0800
committerahze <ahze@df743ca5-7f9a-e211-a948-0013205c9059>2012-01-24 09:15:19 +0800
commit4fce0cc566ac2f87c1b905bdd0df77996ab5818a (patch)
tree43334f02ca918659bc861a7fb40fa9ec7e6086c5 /textproc
parent9ffbcf80eb7b2180d675f6de6c747787adfed9ed (diff)
downloadmarcuscom-ports-4fce0cc566ac2f87c1b905bdd0df77996ab5818a.tar
marcuscom-ports-4fce0cc566ac2f87c1b905bdd0df77996ab5818a.tar.gz
marcuscom-ports-4fce0cc566ac2f87c1b905bdd0df77996ab5818a.tar.bz2
marcuscom-ports-4fce0cc566ac2f87c1b905bdd0df77996ab5818a.tar.lz
marcuscom-ports-4fce0cc566ac2f87c1b905bdd0df77996ab5818a.tar.xz
marcuscom-ports-4fce0cc566ac2f87c1b905bdd0df77996ab5818a.tar.zst
marcuscom-ports-4fce0cc566ac2f87c1b905bdd0df77996ab5818a.zip
Fix allocation error when copying entities
PR: ports/164270 Submitted by: kj <b4039413@nwldx.com> Obtained from: http://git.gnome.org/browse/libxml2/commit/parser.c?id=5bd3c061823a8499b27422aee04ea20aae24f03e Security: http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2011-3919 git-svn-id: svn://creme-brulee.marcuscom.com/ports/trunk@16668 df743ca5-7f9a-e211-a948-0013205c9059
Diffstat (limited to 'textproc')
-rw-r--r--textproc/libxml2/Makefile4
-rw-r--r--textproc/libxml2/files/patch-parser.c13
2 files changed, 15 insertions, 2 deletions
diff --git a/textproc/libxml2/Makefile b/textproc/libxml2/Makefile
index a0e1b045c..1a2c5f658 100644
--- a/textproc/libxml2/Makefile
+++ b/textproc/libxml2/Makefile
@@ -3,7 +3,7 @@
# Whom: Yukihiro Nakai <Nakai@technologist.com>
#
# $FreeBSD$
-# $MCom: ports/textproc/libxml2/Makefile,v 1.10 2012/01/16 16:45:15 ahze Exp $
+# $MCom: ports/textproc/libxml2/Makefile,v 1.11 2012/01/16 17:10:53 ahze Exp $
#
# WITHOUT_SCHEMA disable XML schema support
# WITHOUT_THREADS disable threads support
@@ -14,7 +14,7 @@
PORTNAME= libxml2
PORTVERSION= 2.7.8
-PORTREVISION?= 2
+PORTREVISION?= 3
CATEGORIES?= textproc gnome
MASTER_SITES= ftp://fr.rpmfind.net/pub/libxml/ \
ftp://gd.tuwien.ac.at/pub/libxml/ \
diff --git a/textproc/libxml2/files/patch-parser.c b/textproc/libxml2/files/patch-parser.c
new file mode 100644
index 000000000..68111a113
--- /dev/null
+++ b/textproc/libxml2/files/patch-parser.c
@@ -0,0 +1,13 @@
+diff --git a/parser.c b/parser.c
+index 4e5dcb9..c55e41d 100644
+--- parser.c.orig
++++ parser.c
+@@ -2709,7 +2709,7 @@ xmlStringLenDecodeEntities(xmlParserCtxtPtr ctxt, const xmlChar *str, int len,
+
+ buffer[nbchars++] = '&';
+ if (nbchars > buffer_size - i - XML_PARSER_BUFFER_SIZE) {
+- growBuffer(buffer, XML_PARSER_BUFFER_SIZE);
++ growBuffer(buffer, i + XML_PARSER_BUFFER_SIZE);
+ }
+ for (;i > 0;i--)
+ buffer[nbchars++] = *cur++;