You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pdfbox.apache.org by "Philipp Koch (JIRA)" <ji...@apache.org> on 2009/03/17 10:40:50 UTC

[jira] Resolved: (PDFBOX-438) FlateFilter: endless loop because of missing length check (for encrypted pdfs)

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

Philipp Koch resolved PDFBOX-438.
---------------------------------

    Resolution: Fixed

> 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.