[poppler] poppler/JBIG2Stream.cc

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Sun Dec 27 20:27:06 UTC 2020


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

New commits:
commit 3fb0f4bdff02ccd178ba9fd58c449001c8b5c0ea
Author: Albert Astals Cid <aacid at kde.org>
Date:   Sun Dec 27 19:41:15 2020 +0100

    Fix integer overflow with broken files
    
    oss-fuzz/29020

diff --git a/poppler/JBIG2Stream.cc b/poppler/JBIG2Stream.cc
index a1d84891..a2f72fc0 100644
--- a/poppler/JBIG2Stream.cc
+++ b/poppler/JBIG2Stream.cc
@@ -771,7 +771,9 @@ void JBIG2Bitmap::combine(JBIG2Bitmap *bitmap, int x, int y, unsigned int combOp
     } else {
         x0 = 0;
     }
-    x1 = x + bitmap->w;
+    if (unlikely(checkedAdd(x, bitmap->w, &x1))) {
+        return;
+    }
     if (x1 > w) {
         x1 = w;
     }


More information about the poppler mailing list