2003-12-02 Mark Wielaard <mark@klomp.org>
authormkoch <mkoch@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 2 Dec 2003 15:52:07 +0000 (15:52 +0000)
committermkoch <mkoch@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 2 Dec 2003 15:52:07 +0000 (15:52 +0000)
Reported by Archie Cobbs:
* java/security/DigestInputStream.java (read(byte[], int, int): Call
digest.update() with temp, not len as lenght.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@74186 138bc75d-0d04-0410-961f-82ee72b054a4

libjava/ChangeLog
libjava/java/security/DigestInputStream.java

index 82873fe..2d86a39 100644 (file)
@@ -1,3 +1,9 @@
+2003-12-02  Mark Wielaard  <mark@klomp.org>
+
+       Reported by Archie Cobbs:
+       * java/security/DigestInputStream.java (read(byte[], int, int): Call
+       digest.update() with temp, not len as lenght.
+
 2003-12-02  Michael Koch  <konqueror@gmx.de>
 
        * java/net/DatagramSocket.java
index 3b01dea..9fa987a 100644 (file)
@@ -1,5 +1,5 @@
 /* DigestInputStream.java --- An Input stream tied to a message digest
-   Copyright (C) 1999 Free Software Foundation, Inc.
+   Copyright (C) 1999, 2003 Free Software Foundation, Inc.
 
 This file is part of GNU Classpath.
 
@@ -138,7 +138,7 @@ public class DigestInputStream extends FilterInputStream
     int temp = in.read(b, off, len);
 
     if (state == true && temp != -1)
-      digest.update(b, off, len);
+      digest.update(b, off, temp);
 
     return temp;
   }