poppler/JBIG2Stream.cc | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)
New commits: commit 9bb28091b64c1b19dcdccb63d50593abc15f627a Author: Albert Astals Cid <[email protected]> Date: Mon Jan 4 23:24:36 2021 +0100 JBIG2Stream::readSymbolDictSeg: Return early if one of the bitmaps is null Doesn't seem to regress any of the valid files i have and saves some broken ones that loop for hours diff --git a/poppler/JBIG2Stream.cc b/poppler/JBIG2Stream.cc index 308bf772..db46b1ae 100644 --- a/poppler/JBIG2Stream.cc +++ b/poppler/JBIG2Stream.cc @@ -15,7 +15,7 @@ // // Copyright (C) 2006 Raj Kumar <[email protected]> // Copyright (C) 2006 Paul Walmsley <[email protected]> -// Copyright (C) 2006-2010, 2012, 2014-2020 Albert Astals Cid <[email protected]> +// Copyright (C) 2006-2010, 2012, 2014-2021 Albert Astals Cid <[email protected]> // Copyright (C) 2009 David Benjamin <[email protected]> // Copyright (C) 2011 Edward Jiang <[email protected]> // Copyright (C) 2012 William Bader <[email protected]> @@ -1756,6 +1756,10 @@ bool JBIG2Stream::readSymbolDictSeg(unsigned int segNum, unsigned int length, un // non-ref/agg coding } else { bitmaps[numInputSyms + i] = readGenericBitmap(false, symWidth, symHeight, sdTemplate, false, false, nullptr, sdATX, sdATY, 0).release(); + if (unlikely(!bitmaps[numInputSyms + i])) { + error(errSyntaxError, curStr->getPos(), "NULL bitmap in readGenericBitmap"); + goto syntaxError; + } } ++i; _______________________________________________ poppler mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/poppler
