commit | 55db66c69fd56826b8523710046deab1a8d14ba2 | [log] [tgz] |
---|---|---|
author | Albert Astals Cid <aacid@kde.org> | Wed Jun 21 00:55:20 2017 +0200 |
committer | Albert Astals Cid <aacid@kde.org> | Wed Jun 21 22:31:20 2017 +0200 |
tree | a38f1145887e8b4ce7d5a2363fc613a136ef10ab | |
parent | 5266fa426d73c5dbdb3dd903d50885097833acc6 [diff] |
Fix crash in malformed documents
diff --git a/poppler/JBIG2Stream.cc b/poppler/JBIG2Stream.cc index 4853588..d89108c 100644 --- a/poppler/JBIG2Stream.cc +++ b/poppler/JBIG2Stream.cc
@@ -896,7 +896,7 @@ oneByte = x0 == ((x1 - 1) & ~7); for (yy = y0; yy < y1; ++yy) { - if (unlikely(y + yy) >= h) + if (unlikely((y + yy >= h) || (y + yy < 0))) continue; // one byte per line -- need to mask both left and right side