Author: tilman
Date: Fri Sep 16 16:32:29 2016
New Revision: 1761059

URL: http://svn.apache.org/viewvc?rev=1761059&view=rev
Log:
PDFBOX-3501: avoid ArrayIndexOutOfBoundsException for bitonal images

Modified:
    
pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/graphics/blend/BlendComposite.java

Modified: 
pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/graphics/blend/BlendComposite.java
URL: 
http://svn.apache.org/viewvc/pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/graphics/blend/BlendComposite.java?rev=1761059&r1=1761058&r2=1761059&view=diff
==============================================================================
--- 
pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/graphics/blend/BlendComposite.java
 (original)
+++ 
pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/graphics/blend/BlendComposite.java
 Fri Sep 16 16:32:29 2016
@@ -144,7 +144,9 @@ public final class BlendComposite implem
             Object srcPixel = null;
             Object dstPixel = null;
             float[] srcComponents = new float[numSrcComponents];
-            float[] dstComponents = new float[numDstComponents];
+            // PDFBOX-3501 let getNormalizedComponents allocate to avoid 
+            // ArrayIndexOutOfBoundsException for bitonal target
+            float[] dstComponents = null;
 
             float[] srcColor = new float[numSrcColorComponents];
             float[] srcConverted;


Reply via email to