poppler/GfxState.cc | 6 ++++++
1 file changed, 6 insertions(+)
New commits:
commit ead33cf26ab7416ae0b37f8eeb19dc231e9a31f0
Author: Albert Astals Cid <[email protected]>
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) {
_______________________________________________
poppler mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/poppler