diff options
author | Albert Astals Cid <aacid@kde.org> | 2017-09-13 23:09:45 +0200 |
---|---|---|
committer | Albert Astals Cid <aacid@kde.org> | 2017-09-13 23:09:45 +0200 |
commit | 80f9819b6233f9f9b5fd44f0e4cad026e5d048c2 (patch) | |
tree | 3db08c7982f7d3720607c438b77128524a08dfb2 | |
parent | aaf5327649e8f7371c9d3270e7813c43ddfd47ee (diff) |
isImageInterpolationRequired: Fix divide by 0 on broken documents
Bug #102688
-rw-r--r-- | splash/Splash.cc | 2 |
1 files changed, 1 insertions, 1 deletions
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 */ |