--- poppler-git-3sep12/poppler/JBIG2Stream.cc- 2012-09-03 01:10:00.441035919 +0200 +++ poppler-git-3sep12/poppler/JBIG2Stream.cc 2012-09-03 14:24:25.829038978 +0200 @@ -1817,6 +1817,10 @@ goto syntaxError; } refBitmap = bitmaps[symID]; + if (!refBitmap) { + error(errSyntaxError, curStr->getPos(), "Invalid ref bitmap for symbol ID {0:d} in JBIG2 symbol dictionary", symID); + goto syntaxError; + } bitmaps[numInputSyms + i] = readGenericRefinementRegion(symWidth, symHeight, sdrTemplate, gFalse,