|
# --- ROCK-COPYRIGHT-NOTE-BEGIN ---
|
|
#
|
|
# This copyright note is auto-generated by ./scripts/Create-CopyPatch.
|
|
# Please add additional copyright information _after_ the line containing
|
|
# the ROCK-COPYRIGHT-NOTE-END tag. Otherwise it might get removed by
|
|
# the ./scripts/Create-CopyPatch script. Do not edit this copyright text!
|
|
#
|
|
# ROCK Linux: rock-src/package/kde/kdegraphics/post-3.3.2-kdegraphics.diff
|
|
# ROCK Linux is Copyright (C) 1998 - 2006 Clifford Wolf
|
|
#
|
|
# This patch file is dual-licensed. It is available under the license the
|
|
# patched project is licensed under, as long as it is an OpenSource license
|
|
# as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms
|
|
# of the GNU General Public License as published by the Free Software
|
|
# Foundation; either version 2 of the License, or (at your option) any later
|
|
# version.
|
|
#
|
|
# --- ROCK-COPYRIGHT-NOTE-END ---
|
|
|
|
--- ./kpdf/xpdf/Gfx.cc 2 Sep 2004 21:30:18 -0000 1.4.4.1
|
|
+++ ./kpdf/xpdf/Gfx.cc 22 Dec 2004 12:05:50 -0000 1.4.4.2
|
|
@@ -2654,7 +2654,9 @@ void Gfx::doImage(Object *ref, Stream *s
|
|
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 -b -p -u -r1.3.4.1 -r1.3.4.2
|
|
--- ./kpdf/xpdf/GfxState.cc 2 Sep 2004 21:30:18 -0000 1.3.4.1
|
|
+++ ./kpdf/xpdf/GfxState.cc 22 Dec 2004 12:05:50 -0000 1.3.4.2
|
|
@@ -708,6 +708,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) {
|
|
@@ -1054,7 +1059,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;
|
|
}
|