You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pdfbox.apache.org by "Mel Martinez (JIRA)" <ji...@apache.org> on 2009/10/02 17:11:23 UTC
[jira] Created: (PDFBOX-536) missing iterator.hasNext() test in
PDFXrefStreamParser
missing iterator.hasNext() test in PDFXrefStreamParser
------------------------------------------------------
Key: PDFBOX-536
URL: https://issues.apache.org/jira/browse/PDFBOX-536
Project: PDFBox
Issue Type: Bug
Components: Parsing
Affects Versions: 0.8.0-incubator
Reporter: Mel Martinez
The class: org.apache.pdfbox.pdfparser.PDFXrefStreamParser
uses an unbounded iterator in it's parser method.
Specifically, line 100 should be changed from:
while(pdfSource.available() > 0)
To
while(pdfSource.available() > 0 && objIter.hasNext())
Not having this check causes line 115 to blow up with a NoSuchElementException.
I will attach a test file that triggers the problem (during Text extraction) and also a patched version of PDFXrefStreamParser.java.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (PDFBOX-536) missing iterator.hasNext() test in
PDFXrefStreamParser
Posted by "Andreas Lehmkühler (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/PDFBOX-536?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Andreas Lehmkühler updated PDFBOX-536:
--------------------------------------
Fix Version/s: (was: 0.8.1)
1.0.0
> missing iterator.hasNext() test in PDFXrefStreamParser
> ------------------------------------------------------
>
> Key: PDFBOX-536
> URL: https://issues.apache.org/jira/browse/PDFBOX-536
> Project: PDFBox
> Issue Type: Bug
> Components: Parsing
> Affects Versions: 0.8.0-incubator
> Reporter: Mel Martinez
> Fix For: 1.0.0
>
> Attachments: 09_05_11_Archiv.pdf, PDFXrefStreamParser.java
>
>
> The class: org.apache.pdfbox.pdfparser.PDFXrefStreamParser
> uses an unbounded iterator in it's parser method.
> Specifically, line 100 should be changed from:
> while(pdfSource.available() > 0)
> To
> while(pdfSource.available() > 0 && objIter.hasNext())
> Not having this check causes line 115 to blow up with a NoSuchElementException.
> I will attach a test file that triggers the problem (during Text extraction) and also a patched version of PDFXrefStreamParser.java.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Resolved: (PDFBOX-536) missing iterator.hasNext() test in
PDFXrefStreamParser
Posted by "Andreas Lehmkühler (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/PDFBOX-536?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Andreas Lehmkühler resolved PDFBOX-536.
---------------------------------------
Resolution: Fixed
Fix Version/s: 0.8.1
I've added Mels patch with version 821928.
Thanks to Mel for hie contibution.
> missing iterator.hasNext() test in PDFXrefStreamParser
> ------------------------------------------------------
>
> Key: PDFBOX-536
> URL: https://issues.apache.org/jira/browse/PDFBOX-536
> Project: PDFBox
> Issue Type: Bug
> Components: Parsing
> Affects Versions: 0.8.0-incubator
> Reporter: Mel Martinez
> Fix For: 0.8.1
>
> Attachments: 09_05_11_Archiv.pdf, PDFXrefStreamParser.java
>
>
> The class: org.apache.pdfbox.pdfparser.PDFXrefStreamParser
> uses an unbounded iterator in it's parser method.
> Specifically, line 100 should be changed from:
> while(pdfSource.available() > 0)
> To
> while(pdfSource.available() > 0 && objIter.hasNext())
> Not having this check causes line 115 to blow up with a NoSuchElementException.
> I will attach a test file that triggers the problem (during Text extraction) and also a patched version of PDFXrefStreamParser.java.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (PDFBOX-536) missing iterator.hasNext() test in
PDFXrefStreamParser
Posted by "Mel Martinez (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/PDFBOX-536?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Mel Martinez updated PDFBOX-536:
--------------------------------
Attachment: PDFXrefStreamParser.java
09_05_11_Archiv.pdf
This PDF triggers the bug during text extraction.
The replacement PDFXrefStreamParser.java src file fixes the problem.
> missing iterator.hasNext() test in PDFXrefStreamParser
> ------------------------------------------------------
>
> Key: PDFBOX-536
> URL: https://issues.apache.org/jira/browse/PDFBOX-536
> Project: PDFBox
> Issue Type: Bug
> Components: Parsing
> Affects Versions: 0.8.0-incubator
> Reporter: Mel Martinez
> Attachments: 09_05_11_Archiv.pdf, PDFXrefStreamParser.java
>
>
> The class: org.apache.pdfbox.pdfparser.PDFXrefStreamParser
> uses an unbounded iterator in it's parser method.
> Specifically, line 100 should be changed from:
> while(pdfSource.available() > 0)
> To
> while(pdfSource.available() > 0 && objIter.hasNext())
> Not having this check causes line 115 to blow up with a NoSuchElementException.
> I will attach a test file that triggers the problem (during Text extraction) and also a patched version of PDFXrefStreamParser.java.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.