diff options
author | mkoch <mkoch@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-04-18 19:32:02 +0000 |
---|---|---|
committer | mkoch <mkoch@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-04-18 19:32:02 +0000 |
commit | fab4e2601c8d4edd7d22ce1ffd762820c4e87e38 (patch) | |
tree | d4fd9cf1f88226d33581bc84bc99b93223b6eae3 | |
parent | ca76c43b8a11c28edf26094f86b805f739458a33 (diff) | |
download | gcc-fab4e2601c8d4edd7d22ce1ffd762820c4e87e38.tar.gz |
2005-04-18 Chris Burdess <dog@gnu.org>
* gnu/java/net/BASE64.java: Truncate encoded byte array.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@98343 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r-- | libjava/ChangeLog | 4 | ||||
-rw-r--r-- | libjava/gnu/java/net/BASE64.java | 8 |
2 files changed, 11 insertions, 1 deletions
diff --git a/libjava/ChangeLog b/libjava/ChangeLog index 937e1a26150..e57e0044c48 100644 --- a/libjava/ChangeLog +++ b/libjava/ChangeLog @@ -1,3 +1,7 @@ +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> gnu/java/awt/EmbeddedWindowSupport.java, diff --git a/libjava/gnu/java/net/BASE64.java b/libjava/gnu/java/net/BASE64.java index e711bb6e8ff..2b997e38a36 100644 --- a/libjava/gnu/java/net/BASE64.java +++ b/libjava/gnu/java/net/BASE64.java @@ -1,5 +1,5 @@ /* 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. @@ -109,6 +109,12 @@ public final class BASE64 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) { bt[ti++] = 0x3d; |