Commit b5e9941c authored by Albert Astals Cid's avatar Albert Astals Cid

Fix crash on malformed doc

Where the Colorants dictionary values are not arrays
Document can be found on KDE bug #319925
parent 19f8a88b
......@@ -2534,7 +2534,14 @@ GfxColorSpace *GfxDeviceNColorSpace::parse(Array *arr, OutputDev *out, int recur
for (i = 0; i < colorants->getLength(); i++) {
Object obj3;
colorants->getVal(i, &obj3);
separationList->append(GfxSeparationColorSpace::parse(obj3.getArray(), out, recursion));
if (obj3.isArray()) {
separationList->append(GfxSeparationColorSpace::parse(obj3.getArray(), out, recursion));
} else {
obj3.free();
obj2.free();
error(errSyntaxWarning, -1, "Bad DeviceN color space (colorant value entry is not an Array)");
goto err4;
}
obj3.free();
}
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment