[poppler] poppler/JBIG2Stream.cc

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Tue Oct 26 20:38:28 UTC 2021


 poppler/JBIG2Stream.cc |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

New commits:
commit f18e9f9f1eb562e4bbc23c413c522996696e90df
Author: Albert Astals Cid <aacid at kde.org>
Date:   Tue Oct 26 22:28:26 2021 +0200

    Fix crash in malformed files

diff --git a/poppler/JBIG2Stream.cc b/poppler/JBIG2Stream.cc
index 2dbc3ed9..9eddaa67 100644
--- a/poppler/JBIG2Stream.cc
+++ b/poppler/JBIG2Stream.cc
@@ -2185,7 +2185,9 @@ void JBIG2Stream::readTextRegionSeg(unsigned int segNum, bool imm, bool lossless
             if (pageH == 0xffffffff && y + h > curPageH) {
                 pageBitmap->expand(y + h, pageDefPixel);
             }
-            pageBitmap->combine(bitmap.get(), x, y, extCombOp);
+            if (pageBitmap->isOk()) {
+                pageBitmap->combine(bitmap.get(), x, y, extCombOp);
+            }
 
             // store the region bitmap
         } else {


More information about the poppler mailing list