Author: spouliot
Date: 2007-05-16 18:19:45 -0400 (Wed, 16 May 2007)
New Revision: 77516
Modified:
trunk/mcs/class/corlib/System.Security.Cryptography/ChangeLog
trunk/mcs/class/corlib/System.Security.Cryptography/CryptoStream.cs
Log:
2007-05-16 Sebastien Pouliot <[EMAIL PROTECTED]>
* CryptoStream.cs: Fix another problem that can occurs with WriteByte.
Modified: trunk/mcs/class/corlib/System.Security.Cryptography/ChangeLog
===================================================================
--- trunk/mcs/class/corlib/System.Security.Cryptography/ChangeLog
2007-05-16 22:11:14 UTC (rev 77515)
+++ trunk/mcs/class/corlib/System.Security.Cryptography/ChangeLog
2007-05-16 22:19:45 UTC (rev 77516)
@@ -1,3 +1,7 @@
+2007-05-16 Sebastien Pouliot <[EMAIL PROTECTED]>
+
+ * CryptoStream.cs: Fix another problem that can occurs with WriteByte.
+
2007-05-11 Sebastien Pouliot <[EMAIL PROTECTED]>
* CryptoStream.cs: Ensure TransformFinalBlock isn't called multiple
Modified: trunk/mcs/class/corlib/System.Security.Cryptography/CryptoStream.cs
===================================================================
--- trunk/mcs/class/corlib/System.Security.Cryptography/CryptoStream.cs
2007-05-16 22:11:14 UTC (rev 77515)
+++ trunk/mcs/class/corlib/System.Security.Cryptography/CryptoStream.cs
2007-05-16 22:19:45 UTC (rev 77516)
@@ -291,8 +291,10 @@
_workingBlock = new byte [size];
}
- int len = _transform.TransformBlock
(buffer, offset, size, _workingBlock, 0);
- _stream.Write (_workingBlock, 0, len);
+ if (size > 0) {
+ int len =
_transform.TransformBlock (buffer, offset, size, _workingBlock, 0);
+ _stream.Write (_workingBlock,
0, len);
+ }
if (rem > 0)
Buffer.BlockCopy (buffer,
buffer.Length - rem, _workingBlock, 0, rem);
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches