diff options
author | Albert Astals Cid <aacid@kde.org> | 2016-08-26 15:18:22 +0200 |
---|---|---|
committer | Albert Astals Cid <aacid@kde.org> | 2016-09-04 15:32:21 +0200 |
commit | 22c4701d5f7be0010ee4519daa546fba5ab7ac13 (patch) | |
tree | 9cd71df734b04171f17379badbbd6bd5e3e67b4e | |
parent | c46b8b99b3a2d51692d889df22136cb737d3a47f (diff) |
Fix crash in files with broken JBIG2Streams
-rw-r--r-- | poppler/JBIG2Stream.cc | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/poppler/JBIG2Stream.cc b/poppler/JBIG2Stream.cc index 9f12d5da..a1d2f97c 100644 --- a/poppler/JBIG2Stream.cc +++ b/poppler/JBIG2Stream.cc @@ -892,6 +892,8 @@ void JBIG2Bitmap::combine(JBIG2Bitmap *bitmap, int x, int y, oneByte = x0 == ((x1 - 1) & ~7); for (yy = y0; yy < y1; ++yy) { + if (unlikely(y + yy) >= h) + continue; // one byte per line -- need to mask both left and right side if (oneByte) { |