]> www.fi.muni.cz Git - evince.git/blobdiff - pdf/xpdf/Gfx.cc
Patch from Crispin Flowerday <gnome@flowerday.cx> to avoid rendering the
[evince.git] / pdf / xpdf / Gfx.cc
index a52aa02ac8dbfe71ca43cf3774e3d2a047f8f7ca..e530213b6609bd249880a1830c1da1cc50228723 100644 (file)
@@ -2654,7 +2654,9 @@ void Gfx::doImage(Object *ref, Stream *str, GBool inlineImg) {
     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();