Sophie

Sophie

distrib > Mageia > 6 > armv5tl > media > core-updates-src > by-pkgid > 2cf5de1e21298837da4a1e7a9cc80c0d > files > 3

poppler-0.52.0-3.8.mga6.src.rpm

From 80f9819b6233f9f9b5fd44f0e4cad026e5d048c2 Mon Sep 17 00:00:00 2001
From: Albert Astals Cid <aacid@kde.org>
Date: Wed, 13 Sep 2017 23:09:45 +0200
Subject: isImageInterpolationRequired: Fix divide by 0 on broken documents

Bug #102688

Index: poppler-0.41.0/splash/Splash.cc
===================================================================
--- poppler-0.41.0.orig/splash/Splash.cc
+++ poppler-0.41.0/splash/Splash.cc
@@ -4136,7 +4136,7 @@ SplashError Splash::arbitraryTransformIm
 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 */