poppler/JBIG2Stream.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
New commits: commit 325887ebef8ea1c6ef9d3607a59d95ffea383986 Author: Albert Astals Cid <[email protected]> Date: Sun Sep 10 17:41:47 2017 +0200 Make JBIG2Stream::readGenericBitmap return cleanly on error instead of causing abort Also fixes warning when compiled with newer gcc diff --git a/poppler/JBIG2Stream.cc b/poppler/JBIG2Stream.cc index 50c6eee6..bda7f42e 100644 --- a/poppler/JBIG2Stream.cc +++ b/poppler/JBIG2Stream.cc @@ -2964,8 +2964,8 @@ JBIG2Bitmap *JBIG2Stream::readGenericBitmap(GBool mmr, int w, int h, mmrDecoder->reset(); if (w > INT_MAX - 2) { error(errSyntaxError, curStr->getPos(), "Bad width in JBIG2 generic bitmap"); - // force a call to gmalloc(-1), which will throw an exception - w = -3; + delete bitmap; + return NULL; } // 0 <= codingLine[0] < codingLine[1] < ... < codingLine[n] = w // ---> max codingLine size = w + 1 _______________________________________________ poppler mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/poppler
