FlateFilter: endless loop because of missing length check (for encrypted pdfs)
------------------------------------------------------------------------------
Key: PDFBOX-438
URL: https://issues.apache.org/jira/browse/PDFBOX-438
Project: PDFBox
Issue Type: Bug
Components: PDModel
Affects Versions: 0.8.0-incubator
Reporter: Philipp Koch
Assignee: Philipp Koch
Fix For: 0.8.0-incubator
if mayRead is set to zero than following statement is executed endlessly:
while ((amountRead = decompressor.read(buffer, 0,
Math.min(mayRead,BUFFER_SIZE))) != -1)
{
result.write(buffer, 0, amountRead);
}
we just have to check that mayRead > 0 zero.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.