aboutsummaryrefslogtreecommitdiffstats
path: root/textproc/libxml2
diff options
context:
space:
mode:
authorkwm <kwm@FreeBSD.org>2012-05-18 19:51:18 +0800
committerkwm <kwm@FreeBSD.org>2012-05-18 19:51:18 +0800
commit437c48aec2d5dce7010e4c9550b6908c3733d899 (patch)
treef0e623904a531cafc65efc093a9d162985dca1b1 /textproc/libxml2
parent2b1c56d30fa5da98c3ffcf1a805f9f3026cc9ce4 (diff)
downloadfreebsd-ports-gnome-437c48aec2d5dce7010e4c9550b6908c3733d899.tar.gz
freebsd-ports-gnome-437c48aec2d5dce7010e4c9550b6908c3733d899.tar.zst
freebsd-ports-gnome-437c48aec2d5dce7010e4c9550b6908c3733d899.zip
Document and fix a off-by-one vulnability in libxml2.
Obtained from: libxml upstream Security: b8ae4659-a0da-11e1-a294-bcaec565249c
Diffstat (limited to 'textproc/libxml2')
-rw-r--r--textproc/libxml2/Makefile5
-rw-r--r--textproc/libxml2/files/patch-xpointer.c41
2 files changed, 43 insertions, 3 deletions
diff --git a/textproc/libxml2/Makefile b/textproc/libxml2/Makefile
index 9d4a58567d84..309ec2a130f9 100644
--- a/textproc/libxml2/Makefile
+++ b/textproc/libxml2/Makefile
@@ -13,10 +13,9 @@
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/ \
+MASTER_SITES= ftp://gd.tuwien.ac.at/pub/libxml/ \
ftp://xmlsoft.org/libxml2/
DIST_SUBDIR= gnome2
diff --git a/textproc/libxml2/files/patch-xpointer.c b/textproc/libxml2/files/patch-xpointer.c
new file mode 100644
index 000000000000..877ea2a7d920
--- /dev/null
+++ b/textproc/libxml2/files/patch-xpointer.c
@@ -0,0 +1,41 @@
+From d8e1faeaa99c7a7c07af01c1c72de352eb590a3e Mon Sep 17 00:00:00 2001
+From: Jüri Aedla <asd@ut.ee>
+Date: Mon, 07 May 2012 07:06:56 +0000
+Subject: Fix an off by one pointer access
+
+getting out of the range of memory allocated for xpointer decoding
+CVE-2011-3102
+
+---
+diff --git a/xpointer.c b/xpointer.c
+index 37afa3a..0b463dd 100644
+--- xpointer.c
++++ xpointer.c
+@@ -1007,21 +1007,14 @@ xmlXPtrEvalXPtrPart(xmlXPathParserContextPtr ctxt, xmlChar *name) {
+ NEXT;
+ break;
+ }
+- *cur++ = CUR;
+ } else if (CUR == '(') {
+ level++;
+- *cur++ = CUR;
+ } else if (CUR == '^') {
+- NEXT;
+- if ((CUR == ')') || (CUR == '(') || (CUR == '^')) {
+- *cur++ = CUR;
+- } else {
+- *cur++ = '^';
+- *cur++ = CUR;
+- }
+- } else {
+- *cur++ = CUR;
++ if ((NXT(1) == ')') || (NXT(1) == '(') || (NXT(1) == '^')) {
++ NEXT;
++ }
+ }
++ *cur++ = CUR;
+ NEXT;
+ }
+ *cur = 0;
+--
+cgit v0.9.0.2