Tilman Hausherr created PDFBOX-2187:
---------------------------------------
Summary: 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
Fix For: 1.8.7, 2.0.0
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)