diff options
author | Jeremias Maerki <jeremias@apache.org> | 2008-08-27 08:28:47 +0000 |
---|---|---|
committer | Jeremias Maerki <jeremias@apache.org> | 2008-08-27 08:28:47 +0000 |
commit | e02936ef8dbe59f862465d30cf021b8758385f70 (patch) | |
tree | 9190a5e2096e79df7d9b383f1c0b4e94619ff524 /src | |
parent | 137ca17c1ca4cbe8a64397f78e8c910d529dc61c (diff) | |
download | xmlgraphics-fop-e02936ef8dbe59f862465d30cf021b8758385f70.tar.gz xmlgraphics-fop-e02936ef8dbe59f862465d30cf021b8758385f70.zip |
Fixed ArrayIndexOutOfBoundsException when there is a long text with very few kerning adjustments.
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/branches/Temp_AreaTreeNewDesign@689408 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src')
-rw-r--r-- | src/java/org/apache/fop/render/intermediate/IFRenderer.java | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/java/org/apache/fop/render/intermediate/IFRenderer.java b/src/java/org/apache/fop/render/intermediate/IFRenderer.java index e9190be88..8831656e1 100644 --- a/src/java/org/apache/fop/render/intermediate/IFRenderer.java +++ b/src/java/org/apache/fop/render/intermediate/IFRenderer.java @@ -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; } |