Hi list,

I just merged the attached fix from GNU inetlib.


Michael


2005-02-24  Chris Burdess  <[EMAIL PROTECTED]>

        * BASE64.java: Truncate encoded byte array.

Index: gnu/java/net/BASE64.java
===================================================================
RCS file: /cvsroot/classpath/classpath/gnu/java/net/BASE64.java,v
retrieving revision 1.1
diff -u -r1.1 BASE64.java
--- gnu/java/net/BASE64.java    30 Nov 2004 22:15:03 -0000      1.1
+++ gnu/java/net/BASE64.java    24 Feb 2005 08:13:02 -0000
@@ -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 @@
             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;
_______________________________________________
Classpath-patches mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/classpath-patches

Reply via email to