pdfbox-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From til...@apache.org
Subject svn commit: r1785699 - /pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/filter/CCITTFaxDecoderStream.java
Date Mon, 06 Mar 2017 17:33:27 GMT
Author: tilman
Date: Mon Mar  6 17:33:27 2017
New Revision: 1785699

URL: http://svn.apache.org/viewvc?rev=1785699&view=rev
Log:
PDFBOX-3702: avoid ArrayIndexOutOfBoundsException

Modified:
    pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/filter/CCITTFaxDecoderStream.java

Modified: pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/filter/CCITTFaxDecoderStream.java
URL: http://svn.apache.org/viewvc/pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/filter/CCITTFaxDecoderStream.java?rev=1785699&r1=1785698&r2=1785699&view=diff
==============================================================================
--- pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/filter/CCITTFaxDecoderStream.java
(original)
+++ pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/filter/CCITTFaxDecoderStream.java
Mon Mar  6 17:33:27 2017
@@ -189,7 +189,10 @@ final class CCITTFaxDecoderStream extend
 
                             runLength = decodeRun(white ? blackRunTree : whiteRunTree);
                             index += runLength;
-                            changesCurrentRow[changesCurrentRowCount++] = index;
+                            if (changesCurrentRowCount < changesCurrentRow.length)
+                            {
+                                changesCurrentRow[changesCurrentRowCount++] = index;
+                            }
                             break;
 
                         case VALUE_PASSMODE:



Mime
View raw message