[poppler] poppler/PSOutputDev.cc
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Sat Apr 17 15:25:54 UTC 2021
poppler/PSOutputDev.cc | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
New commits:
commit 3554a152a9badfde6c02bb0001755a7e9c830b32
Author: Albert Astals Cid <aacid at kde.org>
Date: Fri Apr 16 22:49:29 2021 +0200
Prevent integer overflow PSOutputDev::checkPageSlice
oss-fuzz/33333
diff --git a/poppler/PSOutputDev.cc b/poppler/PSOutputDev.cc
index 9ce6648f..2ab62748 100644
--- a/poppler/PSOutputDev.cc
+++ b/poppler/PSOutputDev.cc
@@ -3244,7 +3244,12 @@ bool PSOutputDev::checkPageSlice(Page *page, double /*hDPI*/, double /*vDPI*/, i
sliceW = (int)((box.x2 - box.x1) * hDPI2 / 72.0);
sliceH = (int)((box.y2 - box.y1) * vDPI2 / 72.0);
}
- nStripes = (int)ceil((double)(sliceW * sliceH) / (double)rasterizationSliceSize);
+ int sliceArea;
+ if (checkedMultiply(sliceW, sliceH, &sliceArea)) {
+ delete splashOut;
+ return false;
+ }
+ nStripes = (int)ceil((double)(sliceArea) / (double)rasterizationSliceSize);
if (unlikely(nStripes == 0)) {
delete splashOut;
return false;
More information about the poppler
mailing list