Sophie

Sophie

distrib > Mageia > 6 > armv5tl > media > core-updates-src > by-pkgid > 2cf5de1e21298837da4a1e7a9cc80c0d > files > 18

poppler-0.52.0-3.8.mga6.src.rpm

From 19ebd40547186a8ea6da08c8d8e2a6d6b7e84f5d Mon Sep 17 00:00:00 2001
From: Albert Astals Cid <aacid@kde.org>
Date: Fri, 13 Oct 2017 00:55:49 +0200
Subject: CairoOutputDev: Fix crash in broken files

Bug #103016

Index: poppler-0.57.0/poppler/CairoOutputDev.cc
===================================================================
--- poppler-0.57.0.orig/poppler/CairoOutputDev.cc
+++ poppler-0.57.0/poppler/CairoOutputDev.cc
@@ -2708,7 +2708,9 @@ void CairoOutputDev::drawSoftMaskedImage
   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();