diff options
author | kwm <kwm@df743ca5-7f9a-e211-a948-0013205c9059> | 2004-12-29 06:08:43 +0800 |
---|---|---|
committer | kwm <kwm@df743ca5-7f9a-e211-a948-0013205c9059> | 2004-12-29 06:08:43 +0800 |
commit | 9c11aa44deb0b1be187ab89318442cbe22415a48 (patch) | |
tree | 0a0c219c0519f8cf2f6003d91d39d1f24a0db74d /graphics | |
parent | 04a2849d024079d51a5c5ebd1ec9dab1c31e7bc1 (diff) | |
download | marcuscom-ports-9c11aa44deb0b1be187ab89318442cbe22415a48.tar marcuscom-ports-9c11aa44deb0b1be187ab89318442cbe22415a48.tar.gz marcuscom-ports-9c11aa44deb0b1be187ab89318442cbe22415a48.tar.bz2 marcuscom-ports-9c11aa44deb0b1be187ab89318442cbe22415a48.tar.lz marcuscom-ports-9c11aa44deb0b1be187ab89318442cbe22415a48.tar.xz marcuscom-ports-9c11aa44deb0b1be187ab89318442cbe22415a48.tar.zst marcuscom-ports-9c11aa44deb0b1be187ab89318442cbe22415a48.zip |
Import xpdf security bug fix.
Obtained from: FreeBSD ports
git-svn-id: svn://creme-brulee.marcuscom.com/ports/trunk@3339 df743ca5-7f9a-e211-a948-0013205c9059
Diffstat (limited to 'graphics')
-rw-r--r-- | graphics/gpdf/Makefile | 1 | ||||
-rw-r--r-- | graphics/gpdf/files/patch-xpdf_gpdf-glx.cc | 36 |
2 files changed, 37 insertions, 0 deletions
diff --git a/graphics/gpdf/Makefile b/graphics/gpdf/Makefile index 5736bd846..3c3da6779 100644 --- a/graphics/gpdf/Makefile +++ b/graphics/gpdf/Makefile @@ -7,6 +7,7 @@ PORTNAME= gpdf PORTVERSION= 2.9.1 +PORTREVISION= 1 CATEGORIES= graphics print gnome MASTER_SITES= ${MASTER_SITE_GNOME} MASTER_SITE_SUBDIR= sources/${PORTNAME}/2.9 diff --git a/graphics/gpdf/files/patch-xpdf_gpdf-glx.cc b/graphics/gpdf/files/patch-xpdf_gpdf-glx.cc new file mode 100644 index 000000000..b7fc74eac --- /dev/null +++ b/graphics/gpdf/files/patch-xpdf_gpdf-glx.cc @@ -0,0 +1,36 @@ +--- xpdf/Gfx.cc Mon May 17 21:37:57 2004 ++++ xpdf/Gfx.cc Fri Dec 24 17:01:42 2004 +@@ -2654,7 +2654,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(); +--- xpdf/GfxState.cc Mon May 17 21:37:57 2004 ++++ xpdf/GfxState.cc Fri Dec 24 17:01:42 2004 +@@ -714,6 +714,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) { +@@ -1060,7 +1065,7 @@ + } + nCompsA = obj1.arrayGetLength(); + if (nCompsA > gfxColorMaxComps) { +- error(-1, "DeviceN color space with more than %d > %d components", ++ error(-1, "DeviceN color space with too many (%d > %d) components", + nCompsA, gfxColorMaxComps); + nCompsA = gfxColorMaxComps; + } |