Tilman Hausherr created PDFBOX-2063:
---------------------------------------

             Summary: Incomplete EOF detection in ASCIIHexFilter
                 Key: PDFBOX-2063
                 URL: https://issues.apache.org/jira/browse/PDFBOX-2063
             Project: PDFBox
          Issue Type: Bug
    Affects Versions: 2.0.0
            Reporter: Tilman Hausherr
            Assignee: Tilman Hausherr


ASCIIHexFilter fails with an out of bounds error on the file of PDFBOX-2060.

java.lang.ArrayIndexOutOfBoundsException: -1
        at 
org.apache.pdfbox.filter.ASCIIHexFilter.decode(ASCIIHexFilter.java:68)
        at org.apache.pdfbox.filter.Filter.decode(Filter.java:58)
        at org.apache.pdfbox.cos.COSStream.doDecode(COSStream.java:352)
        at org.apache.pdfbox.cos.COSStream.doDecode(COSStream.java:278)
        at org.apache.pdfbox.cos.COSStream.getDecodeResult(COSStream.java:235)
        at 
org.apache.pdfbox.pdmodel.graphics.image.PDImageXObject.<init>(PDImageXObject.java:94)

The reason is this content:
{code}
/Filter /ASCIIHexDecode
/Length 17
>>
stream
32
              
endstream
{code}

The source code doesn't check for EOF after getting a space. I will check which 
versions are affected and will fix this.



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Reply via email to