[
https://issues.apache.org/jira/browse/PDFBOX-3605?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Tilman Hausherr resolved PDFBOX-3605.
-------------------------------------
Resolution: Fixed
Assignee: Tilman Hausherr
Fix Version/s: 2.1.0
2.0.4
Thank you for the excellent report!
> Infinite Read Loop in BufferedRandomAccesssFile
> -----------------------------------------------
>
> Key: PDFBOX-3605
> URL: https://issues.apache.org/jira/browse/PDFBOX-3605
> Project: PDFBox
> Issue Type: Bug
> Components: FontBox
> Affects Versions: 2.0.3
> Reporter: Cameron Rollheiser
> Assignee: Tilman Hausherr
> Fix For: 2.0.4, 2.1.0
>
>
> When reading an input file using the BufferedRandomAccesssFile an infinite
> loop will occur once the buffer is drained and the value leftover becomes 0,
> since the read method will continue to return 0 as the -1 result from
> fillBuffer() is never propagated upstream and any code that is executing in a
> loop using -1 as an indicator that the file has been fully read will never
> exit.
> An example of where this occurs can be found here:
> https://github.com/apache/pdfbox/blob/782ac20dcea7b2e5bb6848f4da9a68c00b4d69a3/fontbox/src/main/java/org/apache/fontbox/ttf/TTFDataStream.java#L264
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]