Commit 16a5a053 by Chris Burdess Committed by Michael Koch

BASE64.java: Truncate encoded byte array.

2005-04-18  Chris Burdess  <dog@gnu.org>

	* gnu/java/net/BASE64.java: Truncate encoded byte array.

From-SVN: r98343
parent 1c6dcd25
2005-04-18 Chris Burdess <dog@gnu.org>
* gnu/java/net/BASE64.java: Truncate encoded byte array.
2005-04-18 Michael Koch <konqueror@gmx.de> 2005-04-18 Michael Koch <konqueror@gmx.de>
gnu/java/awt/EmbeddedWindowSupport.java, gnu/java/awt/EmbeddedWindowSupport.java,
......
/* BASE.java -- /* BASE.java --
Copyright (C) 2003, 2004 Free Software Foundation, Inc. Copyright (C) 2003, 2004, 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath. This file is part of GNU Classpath.
...@@ -109,6 +109,12 @@ public final class BASE64 ...@@ -109,6 +109,12 @@ public final class BASE64
bt[ti++] = src[b3 & 0x3f]; bt[ti++] = src[b3 & 0x3f];
} }
} }
if (ti < bt.length)
{
byte[] tmp = new byte[ti];
System.arraycopy(bt, 0, tmp, 0, ti);
bt = tmp;
}
/*while (ti < bt.length) /*while (ti < bt.length)
{ {
bt[ti++] = 0x3d; bt[ti++] = 0x3d;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment