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

Tilman Hausherr resolved PDFBOX-2187.
-------------------------------------

    Resolution: Fixed

Fixed in rev 1607891 for the trunk and rev 1607892 for the 1.8 branch.

> ArrayIndexOutOfBoundsException in TIFFFaxDecoder
> ------------------------------------------------
>
>                 Key: PDFBOX-2187
>                 URL: https://issues.apache.org/jira/browse/PDFBOX-2187
>             Project: PDFBox
>          Issue Type: Bug
>          Components: Rendering
>    Affects Versions: 1.8.6, 1.8.7, 2.0.0
>            Reporter: Tilman Hausherr
>            Assignee: Tilman Hausherr
>              Labels: CCITTFaxDecode, ccitt
>             Fix For: 1.8.7, 2.0.0
>
>         Attachments: tiffT6-line1002-002145.pdf, tiffT6-line1002-002489.pdf, 
> tiffT6-line1002-p002145u.pdf, tiffT6-line916-005541u.pdf
>
>
> I get two types of exceptions with several files from the digitalcorpora site:
> {code}
> Exception in thread "AWT-EventQueue-0" 
> java.lang.ArrayIndexOutOfBoundsException: 16
>         at 
> org.apache.pdfbox.filter.ccitt.TIFFFaxDecoder.decodeT6(TIFFFaxDecoder
> .java:1002)        at 
> org.apache.pdfbox.filter.CCITTFaxFilter.decode(CCITTFaxFilter.java:95)
> ...
> {code}
> or
> {code}
> Exception in thread "AWT-EventQueue-0" 
> java.lang.ArrayIndexOutOfBoundsException:1
>        at 
> org.apache.pdfbox.filter.ccitt.TIFFFaxDecoder.decodeT6(TIFFFaxDecoder.java:916)
>        at 
> org.apache.pdfbox.filter.CCITTFaxFilter.decode(CCITTFaxFilter.java:95)
> {code}
> The fix, which is also used by others who use the same code and which solves 
> both exceptions, is to increase w by one in this segment:
> {code}
>         this.prevChangingElems = new int[w];
>         this.currChangingElems = new int[w];
> {code}



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

Reply via email to