You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pdfbox.apache.org by ti...@apache.org on 2023/08/19 03:40:30 UTC
svn commit: r1911763 - /pdfbox/branches/3.0/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/graphics/image/SampledImageReader.java
Author: tilman
Date: Sat Aug 19 03:40:30 2023
New Revision: 1911763
URL: http://svn.apache.org/viewvc?rev=1911763&view=rev
Log:
PDFBOX-5658: catch IllegalArgumentException that happens for huge image dimensions on jdk20
Modified:
pdfbox/branches/3.0/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/graphics/image/SampledImageReader.java
Modified: pdfbox/branches/3.0/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/graphics/image/SampledImageReader.java
URL: http://svn.apache.org/viewvc/pdfbox/branches/3.0/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/graphics/image/SampledImageReader.java?rev=1911763&r1=1911762&r2=1911763&view=diff
==============================================================================
--- pdfbox/branches/3.0/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/graphics/image/SampledImageReader.java (original)
+++ pdfbox/branches/3.0/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/graphics/image/SampledImageReader.java Sat Aug 19 03:40:30 2023
@@ -218,7 +218,7 @@ final class SampledImageReader
}
return fromAny(pdImage, raster, colorKey, clipped, subsampling, width, height);
}
- catch (NegativeArraySizeException ex)
+ catch (NegativeArraySizeException | IllegalArgumentException ex)
{
throw new IOException(ex);
}
@@ -261,7 +261,7 @@ final class SampledImageReader
readRasterFromAny(pdImage, raster);
return raster;
}
- catch (NegativeArraySizeException ex)
+ catch (NegativeArraySizeException | IllegalArgumentException ex)
{
throw new IOException(ex);
}