aboutsummaryrefslogtreecommitdiffstats
path: root/textproc
diff options
context:
space:
mode:
authorerwin <erwin@FreeBSD.org>2005-01-12 01:30:00 +0800
committererwin <erwin@FreeBSD.org>2005-01-12 01:30:00 +0800
commit5df189884ab96a245cfee868a98d4348f2f90817 (patch)
treeb45063e72cac415627442f72b612e5aa9cf81863 /textproc
parent2fcfdd2ab5fe9ec1e561eeb7e52140f63bd662c6 (diff)
downloadfreebsd-ports-graphics-5df189884ab96a245cfee868a98d4348f2f90817.tar.gz
freebsd-ports-graphics-5df189884ab96a245cfee868a98d4348f2f90817.tar.zst
freebsd-ports-graphics-5df189884ab96a245cfee868a98d4348f2f90817.zip
Patch recent xpdf vulnerability
Obtained from: gentoo Prodded by: simon
Diffstat (limited to 'textproc')
-rw-r--r--textproc/pdftohtml/Makefile1
-rw-r--r--textproc/pdftohtml/files/patch-xpdf-Gfx.cc13
-rw-r--r--textproc/pdftohtml/files/patch-xpdf-GfxState.cc14
3 files changed, 28 insertions, 0 deletions
diff --git a/textproc/pdftohtml/Makefile b/textproc/pdftohtml/Makefile
index c451dcafcff..d81af18b8b0 100644
--- a/textproc/pdftohtml/Makefile
+++ b/textproc/pdftohtml/Makefile
@@ -8,6 +8,7 @@
PORTNAME= pdftohtml
PORTVERSION= 0.36
+PORTREVISION= 1
CATEGORIES= textproc
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE}
MASTER_SITE_SUBDIR= ${PORTNAME}
diff --git a/textproc/pdftohtml/files/patch-xpdf-Gfx.cc b/textproc/pdftohtml/files/patch-xpdf-Gfx.cc
new file mode 100644
index 00000000000..3ca8e8a404e
--- /dev/null
+++ b/textproc/pdftohtml/files/patch-xpdf-Gfx.cc
@@ -0,0 +1,13 @@
+--- xpdf/Gfx.cc.orig Wed Jun 25 00:41:27 2003
++++ xpdf/Gfx.cc Tue Jan 11 18:21:14 2005
+@@ -2381,7 +2381,9 @@
+ haveMask = gFalse;
+ dict->lookup("Mask", &maskObj);
+ if (maskObj.isArray()) {
+- for (i = 0; i < maskObj.arrayGetLength(); ++i) {
++ for (i = 0;
++ i < maskObj.arrayGetLength() && i < 2*gfxColorMaxComps;
++ ++i) {
+ maskObj.arrayGet(i, &obj1);
+ maskColors[i] = obj1.getInt();
+ obj1.free();
diff --git a/textproc/pdftohtml/files/patch-xpdf-GfxState.cc b/textproc/pdftohtml/files/patch-xpdf-GfxState.cc
new file mode 100644
index 00000000000..8f91ca3ab79
--- /dev/null
+++ b/textproc/pdftohtml/files/patch-xpdf-GfxState.cc
@@ -0,0 +1,14 @@
+--- xpdf/GfxState.cc.orig Wed Jun 25 00:41:27 2003
++++ xpdf/GfxState.cc Tue Jan 11 18:21:14 2005
+@@ -708,6 +708,11 @@
+ }
+ nCompsA = obj2.getInt();
+ obj2.free();
++ if (nCompsA > gfxColorMaxComps) {
++ error(-1, "ICCBased color space with too many (%d > %d) components",
++ nCompsA, gfxColorMaxComps);
++ nCompsA = gfxColorMaxComps;
++ }
+ if (dict->lookup("Alternate", &obj2)->isNull() ||
+ !(altA = GfxColorSpace::parse(&obj2))) {
+ switch (nCompsA) {