pdfbox-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From til...@apache.org
Subject svn commit: r1772108 - /pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/graphics/color/PDICCBased.java
Date Wed, 30 Nov 2016 20:07:53 GMT
Author: tilman
Date: Wed Nov 30 20:07:52 2016
New Revision: 1772108

URL: http://svn.apache.org/viewvc?rev=1772108&view=rev
Log:
PDFBOX-3610: catch ArrayIndexOutOfBoundsException

Modified:
    pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/graphics/color/PDICCBased.java

Modified: pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/graphics/color/PDICCBased.java
URL: http://svn.apache.org/viewvc/pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/graphics/color/PDICCBased.java?rev=1772108&r1=1772107&r2=1772108&view=diff
==============================================================================
--- pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/graphics/color/PDICCBased.java
(original)
+++ pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/graphics/color/PDICCBased.java
Wed Nov 30 20:07:52 2016
@@ -142,6 +142,7 @@ public final class PDICCBased extends PD
 
             // do things that trigger a ProfileDataException
             // or CMMException due to invalid profiles, see PDFBOX-1295 and PDFBOX-1740
+            // or ArrayIndexOutOfBoundsException, see PDFBOX-3610
             awtColorSpace.fromRGB(new float[3]);
             // this one triggers an exception for PDFBOX-3549 with KCMS
             new Color(awtColorSpace, new float[getNumberOfComponents()], 1f);
@@ -150,7 +151,8 @@ public final class PDICCBased extends PD
         {
             if (e instanceof ProfileDataException ||
                 e instanceof CMMException ||
-                e instanceof IllegalArgumentException)
+                e instanceof IllegalArgumentException ||
+                e instanceof ArrayIndexOutOfBoundsException)
             {
                 // fall back to alternateColorSpace color space
                 awtColorSpace = null;



Mime
View raw message