[poppler] poppler/JBIG2Stream.cc
Albert Astals Cid
aacid at kemper.freedesktop.org
Tue Jun 20 21:51:43 UTC 2017
poppler/JBIG2Stream.cc | 8 ++++++++
1 file changed, 8 insertions(+)
New commits:
commit e44f79b3f7dc44ecb1d88346ed3f0d1b0412f4ab
Author: Albert Astals Cid <aacid at kde.org>
Date: Tue Jun 20 23:51:16 2017 +0200
Fix crash in broken documents
Fixes bug #101525
diff --git a/poppler/JBIG2Stream.cc b/poppler/JBIG2Stream.cc
index 067fb7f0..48535883 100644
--- a/poppler/JBIG2Stream.cc
+++ b/poppler/JBIG2Stream.cc
@@ -760,6 +760,10 @@ JBIG2Bitmap *JBIG2Bitmap::getSlice(Guint x, Guint y, Guint wA, Guint hA) {
JBIG2Bitmap *slice;
Guint xx, yy;
+ if (!data) {
+ return nullptr;
+ }
+
slice = new JBIG2Bitmap(0, wA, hA);
if (slice->isOk()) {
slice->clearToZero();
@@ -3827,6 +3831,10 @@ JBIG2Bitmap *JBIG2Stream::readGenericRefinementRegion(int w, int h,
JBIG2BitmapPtr tpgrCXPtr2 = {0};
int x, y, pix;
+ if (!refBitmap) {
+ return nullptr;
+ }
+
bitmap = new JBIG2Bitmap(0, w, h);
if (!bitmap->isOk())
{
More information about the poppler
mailing list