splash/Splash.cc | 7 +++++++
1 file changed, 7 insertions(+)
New commits:
commit 31fe12c63f0133d124e2115aba607857aaff0978
Author: Markus Trippelsdorf <[email protected]>
Date: Fri Aug 3 00:48:12 2012 +0200
Fix segfault when scaleImage returns NULL
Bug 52488
diff --git a/splash/Splash.cc b/splash/Splash.cc
index d2d965a..e6559f4 100644
--- a/splash/Splash.cc
+++ b/splash/Splash.cc
@@ -16,6 +16,7 @@
// Copyright (C) 2010-2012 Thomas Freitag <[email protected]>
// Copyright (C) 2010 Christian Feuersänger <[email protected]>
// Copyright (C) 2011, 2012 William Bader <[email protected]>
+// Copyright (C) 2012 Markus Trippelsdorf <[email protected]>
//
// To see a description of the changes please see the Changelog file that
// came with your tarball or type make ChangeLog if you are building from git
@@ -3435,6 +3436,9 @@ SplashError Splash::drawImage(SplashImageSource src, void
*srcData,
}
scaledImg = scaleImage(src, srcData, srcMode, nComps, srcAlpha, w, h,
scaledWidth, scaledHeight);
+ if (scaledImg == NULL) {
+ return splashErrBadArg;
+ }
blitImage(scaledImg, srcAlpha, x0, y0, clipRes);
delete scaledImg;
}
@@ -3470,6 +3474,9 @@ SplashError Splash::drawImage(SplashImageSource src, void
*srcData,
}
scaledImg = scaleImage(src, srcData, srcMode, nComps, srcAlpha, w, h,
scaledWidth, scaledHeight);
+ if (scaledImg == NULL) {
+ return splashErrBadArg;
+ }
vertFlipImage(scaledImg, scaledWidth, scaledHeight, nComps);
blitImage(scaledImg, srcAlpha, x0, y0, clipRes);
delete scaledImg;
_______________________________________________
poppler mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/poppler