Hi, On Wed, 2007-01-31 at 17:23 -0800, Casey Marshall wrote: > 2007-01-31 Casey Marshall <[EMAIL PROTECTED]> > > Fixes PR classpath/24191. > Fix suggested by Rafael Teixeira <[EMAIL PROTECTED]>. > * javax/crypto/CipherOutputStream.java (write): check return value > of `update' for null. > [...] > - out.write(cipher.update(buf, off, len)); > + byte[] b = cipher.update(buf, off, len); > + if (b != null) > + super.write(b);
Using super here instead of out makes the mauve
gnu.javax.crypto.jce.TestOfCipherOutputStream test go into an infinite
loop (resulting in stack overflow). I am changing it to use out.write()
again to break the loop.
2007-03-18 Mark Wielaard <[EMAIL PROTECTED]>
* javax/crypto/CipherOutputStream.java (write): Use out.write()
not super.write().
Committed,
Mark
diff -u -r1.4 CipherOutputStream.java
--- javax/crypto/CipherOutputStream.java 1 Feb 2007 01:24:18 -0000
1.4
+++ javax/crypto/CipherOutputStream.java 19 Mar 2007 00:29:10 -0000
@@ -149,6 +149,6 @@
{
byte[] b = cipher.update(buf, off, len);
if (b != null)
- super.write(b);
+ out.write(b);
}
}
signature.asc
Description: This is a digitally signed message part
