]> source.dussan.org Git - xmlgraphics-fop.git/commitdiff
Fixed ArrayIndexOutOfBoundsException when there is a long text with very few kerning...
authorJeremias Maerki <jeremias@apache.org>
Wed, 27 Aug 2008 08:28:47 +0000 (08:28 +0000)
committerJeremias Maerki <jeremias@apache.org>
Wed, 27 Aug 2008 08:28:47 +0000 (08:28 +0000)
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/branches/Temp_AreaTreeNewDesign@689408 13f79535-47bb-0310-9956-ffa450edef68

src/java/org/apache/fop/render/intermediate/IFRenderer.java

index e9190be88154726c1c4a8eeb8f53d1bae892d319..8831656e17d1e708a96526f367bd302f7eebf3f4 100644 (file)
@@ -924,7 +924,8 @@ public class IFRenderer extends AbstractPathOrientedRenderer {
             if (adjust != 0) {
                 int idx = text.length();
                 if (idx > dx.length - 1) {
-                    int[] newDX = new int[dx.length + INITIAL_BUFFER_SIZE];
+                    int newSize = Math.max(dx.length, idx + 1) + INITIAL_BUFFER_SIZE;
+                    int[] newDX = new int[newSize];
                     System.arraycopy(dx, 0, newDX, 0, dx.length);
                     dx = newDX;
                 }