[poppler] Branch 'poppler-0.20' - poppler/JBIG2Stream.cc

Albert Astals Cid aacid at kemper.freedesktop.org
Sat Sep 8 09:10:39 PDT 2012


 poppler/JBIG2Stream.cc |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit ccd3db5a7723ddb692f6dc85ed9d0f5e3dde189f
Author: Albert Astals Cid <aacid at kde.org>
Date:   Sat Sep 8 18:10:14 2012 +0200

    Only complain when the malloc really failed

diff --git a/poppler/JBIG2Stream.cc b/poppler/JBIG2Stream.cc
index 7ddcc81..a8486a3 100644
--- a/poppler/JBIG2Stream.cc
+++ b/poppler/JBIG2Stream.cc
@@ -1636,7 +1636,7 @@ GBool JBIG2Stream::readSymbolDictSeg(Guint segNum, Guint length,
   // get the input symbol bitmaps
   bitmaps = (JBIG2Bitmap **)gmallocn_checkoverflow(numInputSyms + numNewSyms,
 				     sizeof(JBIG2Bitmap *));
-  if (!bitmaps) {
+  if (!bitmaps && (numInputSyms + numNewSyms > 0)) {
     error(errSyntaxError, curStr->getPos(), "Too many input symbols in JBIG2 symbol dictionary");
     delete codeTables;
     goto eofError;


More information about the poppler mailing list