summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlbert Astals Cid <aacid@kde.org>2016-09-04 15:24:14 +0200
committerAlbert Astals Cid <aacid@kde.org>2016-09-04 15:32:21 +0200
commit4552af28684e18c6153ce5598b121a73477af4d6 (patch)
treee7e0527e1f0ffabdd3f95eaef086aa3333bdcf6d
parent364c15795a0508d421ca636bc7b71f93039a82b1 (diff)
Do not crash on invalid files where nStripes is 0
Bug #85276
-rw-r--r--poppler/PSOutputDev.cc4
1 files changed, 4 insertions, 0 deletions
diff --git a/poppler/PSOutputDev.cc b/poppler/PSOutputDev.cc
index 204f16e8..183e9290 100644
--- a/poppler/PSOutputDev.cc
+++ b/poppler/PSOutputDev.cc
@@ -3346,6 +3346,10 @@ GBool PSOutputDev::checkPageSlice(Page *page, double /*hDPI*/, double /*vDPI*/,
}
nStripes = (int)ceil((double)(sliceW * sliceH) /
(double)rasterizationSliceSize);
+ if (unlikely(nStripes == 0)) {
+ delete splashOut;
+ return gFalse;
+ }
stripeH = (sliceH + nStripes - 1) / nStripes;
// render the stripes