[Poppler-bugs] [Bug 52488] Segfault in splash/Splash.cc:4501

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Wed Jul 25 16:49:42 PDT 2012


https://bugs.freedesktop.org/show_bug.cgi?id=52488

--- Comment #2 from Octoploid <cryptooctoploid at gmail.com> 2012-07-25 16:49:42 PDT ---
The following patch fixes the issue for me:

diff --git a/splash/Splash.cc b/splash/Splash.cc
index b927e5e..76fdd8f 100644
--- a/splash/Splash.cc
+++ b/splash/Splash.cc
@@ -3492,8 +3492,10 @@ SplashError Splash::drawImage(SplashImageSource src,
void *srcData,
       }
       scaledImg = scaleImage(src, srcData, srcMode, nComps, srcAlpha, w, h,
                             scaledWidth, scaledHeight);
-      vertFlipImage(scaledImg, scaledWidth, scaledHeight, nComps);
-      blitImage(scaledImg, srcAlpha, x0, y0, clipRes);
+      if (scaledImg) {
+        vertFlipImage(scaledImg, scaledWidth, scaledHeight, nComps);
+        blitImage(scaledImg, srcAlpha, x0, y0, clipRes);
+      }
       delete scaledImg;
     }

-- 
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.


More information about the Poppler-bugs mailing list