You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pdfbox.apache.org by "Andreas Lehmkühler (JIRA)" <ji...@apache.org> on 2014/09/19 16:41:47 UTC

[jira] [Closed] (PDFBOX-2187) ArrayIndexOutOfBoundsException in TIFFFaxDecoder

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

Andreas Lehmkühler closed PDFBOX-2187.
--------------------------------------

> 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 ArrayIndexOutOfBoundsExceptions at two locations 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.3.4#6332)