File CVE-2017-15565.patch of Package poppler.8309

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
---
 poppler/CairoOutputDev.cc | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

Index: poppler-0.24.4/poppler/CairoOutputDev.cc
===================================================================
--- poppler-0.24.4.orig/poppler/CairoOutputDev.cc	2013-10-10 00:18:28.000000000 +0000
+++ poppler-0.24.4/poppler/CairoOutputDev.cc	2018-06-06 08:54:33.594546142 +0000
@@ -2528,8 +2528,10 @@ void CairoOutputDev::drawSoftMaskedImage
   for (y = 0; y < maskHeight; y++) {
     maskDest = (unsigned char *) (maskBuffer + y * row_stride);
     pix = maskImgStr->getLine();
+    if (likely(pix != 0)) {
     maskColorMap->getGrayLine (pix, maskDest, maskWidth);
   }
+  }
 
   maskImgStr->close();
   delete maskImgStr;