summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastian Pipping <sping@gentoo.org>2016-07-26 21:23:09 +0200
committerSebastian Pipping <sping@gentoo.org>2016-07-26 21:23:32 +0200
commit16a87b549461e49ac8b7915d892d4d8ca187c1b1 (patch)
tree90d604b90e0b21bfbc2570e69a5f307d59d5f29e /dev-libs/expat/files
parentMerge remote-tracking branch 'github/pr/1633', bug 527306 by Ettore Di Giacinto (diff)
downloadgentoo-16a87b549461e49ac8b7915d892d4d8ca187c1b1.tar.gz
gentoo-16a87b549461e49ac8b7915d892d4d8ca187c1b1.tar.bz2
gentoo-16a87b549461e49ac8b7915d892d4d8ca187c1b1.zip
dev-libs/expat: CVE-2016-0718 regression fix
Package-Manager: portage-2.2.28
Diffstat (limited to 'dev-libs/expat/files')
-rw-r--r--dev-libs/expat/files/expat-2.1.1-CVE-2016-0718-regression.patch27
1 files changed, 27 insertions, 0 deletions
diff --git a/dev-libs/expat/files/expat-2.1.1-CVE-2016-0718-regression.patch b/dev-libs/expat/files/expat-2.1.1-CVE-2016-0718-regression.patch
new file mode 100644
index 000000000000..03ea42def99b
--- /dev/null
+++ b/dev-libs/expat/files/expat-2.1.1-CVE-2016-0718-regression.patch
@@ -0,0 +1,27 @@
+From 3e6190e433479e56f8c1e5adc1198b3c86b15577 Mon Sep 17 00:00:00 2001
+From: Sebastian Pipping <sebastian@pipping.org>
+Date: Sun, 17 Jul 2016 20:22:29 +0200
+Subject: [PATCH] Fix regression introduced by patch to CVE-2016-0718 (bug
+ #539)
+
+Tag names were cut off in some cases; reported by Andy Wang
+---
+ expat/lib/xmlparse.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/expat/lib/xmlparse.c b/expat/lib/xmlparse.c
+index 13e080d..2630310 100644
+--- a/expat/lib/xmlparse.c
++++ b/expat/lib/xmlparse.c
+@@ -2430,7 +2430,7 @@ doContent(XML_Parser parser,
+ &fromPtr, rawNameEnd,
+ (ICHAR **)&toPtr, (ICHAR *)tag->bufEnd - 1);
+ convLen = (int)(toPtr - (XML_Char *)tag->buf);
+- if ((convert_res == XML_CONVERT_COMPLETED) || (convert_res == XML_CONVERT_INPUT_INCOMPLETE)) {
++ if ((fromPtr >= rawNameEnd) || (convert_res == XML_CONVERT_INPUT_INCOMPLETE)) {
+ tag->name.strLen = convLen;
+ break;
+ }
+--
+2.9.2
+