[poppler] splash/Splash.cc

Albert Astals Cid aacid at kemper.freedesktop.org
Wed Sep 13 21:10:17 UTC 2017


 splash/Splash.cc |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 80f9819b6233f9f9b5fd44f0e4cad026e5d048c2
Author: Albert Astals Cid <aacid at kde.org>
Date:   Wed Sep 13 23:09:45 2017 +0200

    isImageInterpolationRequired: Fix divide by 0 on broken documents
    
    Bug #102688

diff --git a/splash/Splash.cc b/splash/Splash.cc
index 46b8ce29..39fc7d64 100644
--- a/splash/Splash.cc
+++ b/splash/Splash.cc
@@ -4134,7 +4134,7 @@ SplashError Splash::arbitraryTransformImage(SplashImageSource src, SplashICCTran
 static GBool isImageInterpolationRequired(int srcWidth, int srcHeight,
                                           int scaledWidth, int scaledHeight,
                                           GBool interpolate) {
-  if (interpolate)
+  if (interpolate || srcWidth == 0 || srcHeight == 0)
     return gTrue;
 
   /* When scale factor is >= 400% we don't interpolate. See bugs #25268, #9860 */


More information about the poppler mailing list