pdfbox-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From til...@apache.org
Subject svn commit: r1761060 - /pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/graphics/blend/BlendComposite.java
Date Fri, 16 Sep 2016 16:32:35 GMT
Author: tilman
Date: Fri Sep 16 16:32:35 2016
New Revision: 1761060

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

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

Modified: pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/graphics/blend/BlendComposite.java
URL: http://svn.apache.org/viewvc/pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/graphics/blend/BlendComposite.java?rev=1761060&r1=1761059&r2=1761060&view=diff
==============================================================================
--- pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/graphics/blend/BlendComposite.java
(original)
+++ pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/graphics/blend/BlendComposite.java
Fri Sep 16 16:32:35 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;



Mime
View raw message