openbsd-ports/textproc/gpdf/patches/patch-xpdf_GfxState_cc
naddy b5ba305851 SECURITY:
Catch up with xpdf 3.00 pl2 and pl3 for various vulnerabilities, and a fix
for CAN-2005-2097 from Kristian Hoegsberg.
ok mbalmer@, pvalchev@
2005-08-22 22:37:12 +00:00

25 lines
941 B
Plaintext

$OpenBSD: patch-xpdf_GfxState_cc,v 1.1 2005/08/22 22:37:12 naddy Exp $
--- xpdf/GfxState.cc.orig Sat Aug 20 22:10:30 2005
+++ xpdf/GfxState.cc Sat Aug 20 22:12:38 2005
@@ -714,6 +714,11 @@ GfxColorSpace *GfxICCBasedColorSpace::pa
}
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 @@ GfxColorSpace *GfxDeviceNColorSpace::par
}
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;
}