[poppler] Branch 'poppler-0.22' - 2 commits - splash/Splash.cc

Albert Astals Cid aacid at kemper.freedesktop.org
Wed Jan 9 13:57:07 PST 2013


 splash/Splash.cc |   11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)

New commits:
commit a9b8ab4657dec65b8b86c225d12c533ad7e984e2
Author: Albert Astals Cid <aacid at kde.org>
Date:   Wed Jan 9 22:56:45 2013 +0100

    Fix crash in broken file 1031.pdf.asan.48.15

diff --git a/splash/Splash.cc b/splash/Splash.cc
index 0b33022..24d934a 100644
--- a/splash/Splash.cc
+++ b/splash/Splash.cc
@@ -2955,7 +2955,7 @@ void Splash::arbitraryTransformMask(SplashImageMaskSource src, void *srcData,
   scaledMask = scaleMask(src, srcData, srcWidth, srcHeight,
 			 scaledWidth, scaledHeight);
   if (scaledMask->data == NULL) {
-    error(errInternal, -1, "scaledMask->data is NULL in Splash::scaleMaskYuXu");
+    error(errInternal, -1, "scaledMask->data is NULL in Splash::arbitraryTransformMask");
     delete scaledMask;
     return;
   }
@@ -3461,11 +3461,15 @@ void Splash::blitMask(SplashBitmap *src, int xDest, int yDest,
 
   w = src->getWidth();
   h = src->getHeight();
+  p = src->getDataPtr();
+  if (p == NULL) {
+    error(errInternal, -1, "src->getDataPtr() is NULL in Splash::blitMask");
+    return;    
+  }
   if (vectorAntialias && clipRes != splashClipAllInside) {
     pipeInit(&pipe, xDest, yDest, state->fillPattern, NULL,
 	     (Guchar)splashRound(state->fillAlpha * 255), gTrue, gFalse);
     drawAAPixelInit();
-    p = src->getDataPtr();
     for (y = 0; y < h; ++y) {
       for (x = 0; x < w; ++x) {
 	pipe.shape = *p++;
@@ -3475,7 +3479,6 @@ void Splash::blitMask(SplashBitmap *src, int xDest, int yDest,
   } else {
     pipeInit(&pipe, xDest, yDest, state->fillPattern, NULL,
 	     (Guchar)splashRound(state->fillAlpha * 255), gTrue, gFalse);
-    p = src->getDataPtr();
     if (clipRes == splashClipAllInside) {
       for (y = 0; y < h; ++y) {
 	pipeSetXY(&pipe, xDest, yDest + y);
commit 7266a634e01e20648cc877371edc95651d30d4fc
Author: Albert Astals Cid <aacid at kde.org>
Date:   Wed Jan 9 22:52:45 2013 +0100

    Forgot the C of the last commit

diff --git a/splash/Splash.cc b/splash/Splash.cc
index 2e3687a..0b33022 100644
--- a/splash/Splash.cc
+++ b/splash/Splash.cc
@@ -11,7 +11,7 @@
 // All changes made under the Poppler project to this file are licensed
 // under GPL version 2 or later
 //
-// Copyright (C) 2005-2012 Albert Astals Cid <aacid at kde.org>
+// Copyright (C) 2005-2013 Albert Astals Cid <aacid at kde.org>
 // Copyright (C) 2005 Marco Pesenti Gritti <mpg at redhat.com>
 // Copyright (C) 2010-2012 Thomas Freitag <Thomas.Freitag at alfa.de>
 // Copyright (C) 2010 Christian Feuersänger <cfeuersaenger at googlemail.com>


More information about the poppler mailing list