[poppler] poppler/GfxState.cc
Albert Astals Cid
aacid at kemper.freedesktop.org
Mon Aug 22 21:41:03 UTC 2016
poppler/GfxState.cc | 6 ++++++
1 file changed, 6 insertions(+)
New commits:
commit ead33cf26ab7416ae0b37f8eeb19dc231e9a31f0
Author: Albert Astals Cid <aacid at kde.org>
Date: Mon Aug 22 23:40:07 2016 +0200
Make sure GfxICCBasedColorSpace and its alt colorspace have the same number of nComps
On files where this doesn't happen (only bad files i've found so far) this is leading to crashes
diff --git a/poppler/GfxState.cc b/poppler/GfxState.cc
index d3ea481..368ee27 100644
--- a/poppler/GfxState.cc
+++ b/poppler/GfxState.cc
@@ -2013,6 +2013,12 @@ GfxColorSpace *GfxICCBasedColorSpace::parse(Array *arr, OutputDev *out, GfxState
}
}
obj2.free();
+ if (altA->getNComps() != nCompsA) {
+ error(errSyntaxWarning, -1, "Bad ICCBased color space - N doesn't match alt color space");
+ delete altA;
+ obj1.free();
+ return NULL;
+ }
cs = new GfxICCBasedColorSpace(nCompsA, altA, &iccProfileStreamA);
if (dict->lookup("Range", &obj2)->isArray() &&
obj2.arrayGetLength() == 2 * nCompsA) {
More information about the poppler
mailing list