You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pdfbox.apache.org by "Adam Nichols (JIRA)" <ji...@apache.org> on 2010/11/29 19:33:14 UTC
[jira] Resolved: (PDFBOX-910) certain sequences (such as
endstrea[^m] are eaten by BaseParser#readUntilEndStream
[ https://issues.apache.org/jira/browse/PDFBOX-910?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Adam Nichols resolved PDFBOX-910.
---------------------------------
Resolution: Fixed
Patched in revision 1040218
> certain sequences (such as endstrea[^m] are eaten by BaseParser#readUntilEndStream
> ----------------------------------------------------------------------------------
>
> Key: PDFBOX-910
> URL: https://issues.apache.org/jira/browse/PDFBOX-910
> Project: PDFBox
> Issue Type: Bug
> Components: Parsing
> Affects Versions: 1.3.1
> Reporter: Adam Nichols
> Assignee: Adam Nichols
> Priority: Minor
> Fix For: 1.4.0
>
>
> Reported on the dev list by Martijn List:
> It looks like there are two missing else parts in
> BaseParser#readUntilEndStream.
> The last part when trying to match "endstream" contains this:
> if(byteRead==M){
> //found the whole marker
> pdfSource.unread( ENDSTREAM );
> return;
> }
> But what happens when the last character is not "m" (for example
> endstreaX). Because there is no else statement it seems that "endstrea"
> is never written. Shouldn't it be:
> if(byteRead==M){
> //found the whole marker
> pdfSource.unread( ENDSTREAM );
> return;
> }
> else {
> out.write(ENDSTREAM, 0, 8);
> }
> Similar thing happens happens below when matching "endobj".
> If the last character does not match "j". "endob" is not written:
> if(byteRead==J){
> //found whole marker
> pdfSource.unread( ENDOBJ );
> return;
> }
> shouldn't it be:
> if(byteRead==J){
> //found whole marker
> pdfSource.unread( ENDOBJ );
> return;
> }
> else {
> out.write(ENDOBJ, 0, 5);
> }
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.