[poppler] poppler/JBIG2Stream.cc

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Wed Apr 17 08:17:50 UTC 2019


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

New commits:
commit d1223ff2890a028834d1bdccb8984dc58575eda1
Author: LE GARREC Vincent <gitlab-freedesktop at le-garrec.fr>
Date:   Wed Apr 17 08:17:47 2019 +0000

    ofz-8552: Overflow JBIG2Stream::readTextRegion
    
    And fix endless loop.

diff --git a/poppler/JBIG2Stream.cc b/poppler/JBIG2Stream.cc
index 2da0afef..56f97fd5 100644
--- a/poppler/JBIG2Stream.cc
+++ b/poppler/JBIG2Stream.cc
@@ -2596,7 +2596,10 @@ JBIG2Bitmap *JBIG2Stream::readTextRegion(bool huff, bool refine,
 	  break;
 	}
       }
-      s += sOffset + ds;
+      if (checkedAdd(s, sOffset + ds, &s)) {
+	delete bitmap;
+	return nullptr;
+      }
     }
   }
 


More information about the poppler mailing list