From d9fe5fccada602b37dc020db0df62f2c74068c6e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20Lehmk=C3=BChler?= Date: Wed, 25 Sep 2024 17:52:42 +0000 Subject: [PATCH] PDFBOX-5852: fix ArrayIndexOutOfBoundsException git-svn-id: https://svn.apache.org/repos/asf/pdfbox/trunk@1920923 13f79535-47bb-0310-9956-ffa450edef68 --- .../pdmodel/graphics/shading/PatchMeshesShadingContext.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/graphics/shading/PatchMeshesShadingContext.java b/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/graphics/shading/PatchMeshesShadingContext.java index 572e420b517..4ed5c2249ed 100644 --- a/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/graphics/shading/PatchMeshesShadingContext.java +++ b/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/graphics/shading/PatchMeshesShadingContext.java @@ -60,7 +60,7 @@ protected PatchMeshesShadingContext(PDMeshBasedShadingType shading, ColorModel c @Override protected int[][] calcPixelTableArray(Rectangle deviceBounds) throws IOException { - int[][] array = new int[deviceBounds.width][deviceBounds.height]; + int[][] array = new int[deviceBounds.width + 1][deviceBounds.height + 1]; int initialValue = getBackground() != null ? getRgbBackground() : -1; for (int i = 0; i < deviceBounds.width + 1; i++) {