[poppler] poppler/JBIG2Stream.cc

Albert Astals Cid aacid at kemper.freedesktop.org
Fri Jan 23 14:11:38 PST 2009


 poppler/JBIG2Stream.cc |    7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

New commits:
commit d3f04f537fb3e963c149a7e2d8d83c7cb19da8c0
Author: Albert Astals Cid <aacid at kde.org>
Date:   Fri Jan 23 23:08:46 2009 +0100

    Do not crash in some PDF we don't parse correctly
    
    Fixes bug 19702

diff --git a/poppler/JBIG2Stream.cc b/poppler/JBIG2Stream.cc
index 74b5ab8..5642c20 100644
--- a/poppler/JBIG2Stream.cc
+++ b/poppler/JBIG2Stream.cc
@@ -15,7 +15,7 @@
 //
 // Copyright (C) 2006 Raj Kumar <rkumar at archive.org>
 // Copyright (C) 2006 Paul Walmsley <paul at booyaka.com>
-// Copyright (C) 2006-2008 Albert Astals Cid <aacid at kde.org>
+// Copyright (C) 2006-2009 Albert Astals Cid <aacid at kde.org>
 //
 // To see a description of the changes please see the Changelog file that
 // came with your tarball or type make ChangeLog if you are building from git
@@ -1787,6 +1787,11 @@ GBool JBIG2Stream::readSymbolDictSeg(Guint segNum, Guint length,
     }
     ex = !ex;
   }
+  for ( ; j < numExSyms; ++j) {
+    // this should never happen but happens on PDF we don't parse
+    // correctly like bug #19702
+    symbolDict->setBitmap(j, NULL);
+  }
 
   for (i = 0; i < numNewSyms; ++i) {
     delete bitmaps[numInputSyms + i];


More information about the poppler mailing list