You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pdfbox.apache.org by Shengwen Yang <ya...@gmail.com> on 2009/03/31 11:02:01 UTC
bug report
Line 98 in org.apache.pdfbox.filter.FlateFilter may cause dead loop when the
document is blank (See below).It may be changed to:
"while ((amountRead = decompressor.read(buffer, 0,
Math.min(mayRead,BUFFER_SIZE))) > 0)"
Attached please find a test document. Thanks!
-----------------------------------------------------------------------------------
if (predictor==-1 || predictor == 1 || predictor == 10)
{
// decoding not needed
===> while ((amountRead = decompressor.read(buffer, 0,
Math.min(mayRead,BUFFER_SIZE))) != -1)
{
result.write(buffer, 0, amountRead);
}
}
-----------------------------------------------------------------------------------