[poppler] poppler/SplashOutputDev.cc

Albert Astals Cid aacid at kemper.freedesktop.org
Thu Mar 26 07:45:08 PDT 2015


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

New commits:
commit ede6d00688fcf0e3c843b0a507304f5a98395d41
Author: Albert Astals Cid <aacid at kde.org>
Date:   Thu Mar 26 15:44:40 2015 +0100

    memset on error to have reproducible outputs

diff --git a/poppler/SplashOutputDev.cc b/poppler/SplashOutputDev.cc
index 455c2be..7ad4d44 100644
--- a/poppler/SplashOutputDev.cc
+++ b/poppler/SplashOutputDev.cc
@@ -2831,14 +2831,15 @@ GBool SplashOutputDev::imageSrc(void *data, SplashColorPtr colorLine,
 #endif
   int nComps, x;
 
+  nComps = imgData->colorMap->getNumPixelComps();
   if (imgData->y == imgData->height) {
     return gFalse;
   }
   if (!(p = imgData->imgStr->getLine())) {
+    memset(colorLine, 0, imgData->width * nComps);
     return gFalse;
   }
 
-  nComps = imgData->colorMap->getNumPixelComps();
 
   if (imgData->lookup) {
     switch (imgData->colorMode) {


More information about the poppler mailing list