+2005-01-05 Marco Pesenti Gritti <marco@gnome.org>
+
+ * pdf/xpdf/Gfx.cc:
+ * pdf/xpdf/GfxState.cc:
+
+ Fix for CAN-2004-1125
+
2005-01-05 Marco Pesenti Gritti <marco@gnome.org>
* shell/ev-view.c: (ev_view_copy):
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();
}
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) {
}
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;
}