[ 
https://issues.apache.org/jira/browse/PDFBOX-3888?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17071867#comment-17071867
 ] 

Andreas Lehmkühler commented on PDFBOX-3888:
--------------------------------------------

I've fixed the issue by simply adding a loop. Most likely such calls of read() 
should read all needed bytes, but it looks like this is only true if a small 
amount of bytes is needed. In the ShowSignature example PDFBox has to read 
33318 bytes and that isn't done in one step therefore a loop is needed. Saying 
that, IMHO the implementation of BaseParser.checkForEndOfString() should be 
safe as only 3 bytes are needed


> Refactor COSParser
> ------------------
>
>                 Key: PDFBOX-3888
>                 URL: https://issues.apache.org/jira/browse/PDFBOX-3888
>             Project: PDFBox
>          Issue Type: Improvement
>          Components: Parsing
>    Affects Versions: 3.0.0 PDFBox
>            Reporter: Andreas Lehmkühler
>            Assignee: Andreas Lehmkühler
>            Priority: Major
>              Labels: parsing
>             Fix For: 3.0.0 PDFBox
>
>         Attachments: QV_RCA1_RCA3_CPCPS_V4_11.pdf
>
>
> The COSParser contains a lot of stuff which is more or less hard to 
> understand/maintain. I'm going to refactor some of the code as follows
> - separate the bruteforce stuff maybe in its own class
> - separate the parsing of the xref data maybe in its own class
> - lay the foundation for the on demand parser



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to