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

New commits:
commit ccd3db5a7723ddb692f6dc85ed9d0f5e3dde189f
Author: Albert Astals Cid <[email protected]>
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;
_______________________________________________
poppler mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/poppler

Reply via email to