You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pdfbox.apache.org by "Andreas Lehmkühler (JIRA)" <ji...@apache.org> on 2015/05/25 18:29:17 UTC

[jira] [Resolved] (PDFBOX-2811) Infinite loop within RandomAccessBuffer

     [ https://issues.apache.org/jira/browse/PDFBOX-2811?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Andreas Lehmkühler resolved PDFBOX-2811.
----------------------------------------
    Resolution: Fixed

I've fixed the calculation of the currentBufferPointer to avoid the infinite loop. I've added a test case which demonstrates the described corner case.

> Infinite loop within RandomAccessBuffer 
> ----------------------------------------
>
>                 Key: PDFBOX-2811
>                 URL: https://issues.apache.org/jira/browse/PDFBOX-2811
>             Project: PDFBox
>          Issue Type: Bug
>          Components: PDModel
>    Affects Versions: 1.8.9, 2.0.0
>            Reporter: Andreas Lehmkühler
>            Assignee: Andreas Lehmkühler
>             Fix For: 1.8.10, 2.0.0
>
>
> I've found an issue with RandomAccessBuffer which is triggered in a very specific corner case only:
> - the buffer has more than 1 chunk
> - read(byte[] b, int offset, int length) is used to read the data
> - the data is read in portions
> - one of the portions to be read is identical with the last remaining bytes of the current chunk
> The current implementation won't advance to the next buffer, but reads the last bytes again and again.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@pdfbox.apache.org
For additional commands, e-mail: dev-help@pdfbox.apache.org