diff options
author | Albert Astals Cid <aacid@kde.org> | 2009-01-23 23:08:46 +0100 |
---|---|---|
committer | Albert Astals Cid <aacid@kde.org> | 2009-01-23 23:11:26 +0100 |
commit | d3f04f537fb3e963c149a7e2d8d83c7cb19da8c0 (patch) | |
tree | ff0847951d56ba71b94e822f94132a33aceec67b | |
parent | 3990c9e52da7b17215506857c792c90a37ebac79 (diff) |
Do not crash in some PDF we don't parse correctly
Fixes bug 19702
-rw-r--r-- | poppler/JBIG2Stream.cc | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/poppler/JBIG2Stream.cc b/poppler/JBIG2Stream.cc index 74b5ab8b..5642c20d 100644 --- a/poppler/JBIG2Stream.cc +++ b/poppler/JBIG2Stream.cc @@ -15,7 +15,7 @@ // // Copyright (C) 2006 Raj Kumar <rkumar@archive.org> // Copyright (C) 2006 Paul Walmsley <paul@booyaka.com> -// Copyright (C) 2006-2008 Albert Astals Cid <aacid@kde.org> +// Copyright (C) 2006-2009 Albert Astals Cid <aacid@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]; |