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);
                }
            }
-----------------------------------------------------------------------------------

Reply via email to