Skip to content

Commit

Permalink
eclipse-ee4j#1700: ArrayIndexOutOfBoundsException when using com.sun…
Browse files Browse the repository at this point in the history
….xml.bind.v2.runtime.output.C14nXmlOutput

Signed-off-by: Lukas Jungmann <lukas.jungmann@oracle.com>
(cherry picked from commit 2bbf269)
  • Loading branch information
lukasj committed Oct 9, 2023
1 parent f51e420 commit d5ef6a6
Showing 1 changed file with 4 additions and 3 deletions.
@@ -1,5 +1,5 @@
/*
* Copyright (c) 1997, 2021 Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1997, 2023 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Distribution License v. 1.0, which is available at
Expand Down Expand Up @@ -122,8 +122,9 @@ public void attribute(Name name, String value) throws IOException {
int newLen = len*2;
StaticAttribute[] newbuf = new StaticAttribute[newLen];
System.arraycopy(staticAttributes,0,newbuf,0,len);
for(int i=len;i<newLen;i++)
staticAttributes[i] = new StaticAttribute();
for(int i=len;i<newLen;i++) {
newbuf[i] = new StaticAttribute();
}
staticAttributes = newbuf;
}

Expand Down

0 comments on commit d5ef6a6

Please sign in to comment.