[poppler] poppler/CairoOutputDev.cc

Albert Astals Cid aacid at kemper.freedesktop.org
Thu Oct 12 22:56:26 UTC 2017


 poppler/CairoOutputDev.cc |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

New commits:
commit 19ebd40547186a8ea6da08c8d8e2a6d6b7e84f5d
Author: Albert Astals Cid <aacid at kde.org>
Date:   Fri Oct 13 00:55:49 2017 +0200

    CairoOutputDev: Fix crash in broken files
    
    Bug #103016

diff --git a/poppler/CairoOutputDev.cc b/poppler/CairoOutputDev.cc
index ffd39ef7..80f7a99e 100644
--- a/poppler/CairoOutputDev.cc
+++ b/poppler/CairoOutputDev.cc
@@ -2714,7 +2714,9 @@ void CairoOutputDev::drawSoftMaskedImage(GfxState *state, Object *ref, Stream *s
   for (y = 0; y < maskHeight; y++) {
     maskDest = (unsigned char *) (maskBuffer + y * row_stride);
     pix = maskImgStr->getLine();
-    maskColorMap->getGrayLine (pix, maskDest, maskWidth);
+    if (likely(pix != nullptr)) {
+        maskColorMap->getGrayLine (pix, maskDest, maskWidth);
+    }
   }
 
   maskImgStr->close();


More information about the poppler mailing list