Author: spouliot
Date: 2007-03-22 14:16:09 -0500 (Thu, 22 Mar 2007)
New Revision: 74826
Modified:
trunk/mcs/class/corlib/Mono.Security.Cryptography/ChangeLog
trunk/mcs/class/corlib/Mono.Security.Cryptography/SymmetricTransform.cs
Log:
2007-03-22 Sebastien Pouliot <[EMAIL PROTECTED]>
* SymmetricTransform.cs: Before 2.0 an IndexOutOfRangeException was
thrown (for all unmanaged transforms) in case of an overflow.
Modified: trunk/mcs/class/corlib/Mono.Security.Cryptography/ChangeLog
===================================================================
--- trunk/mcs/class/corlib/Mono.Security.Cryptography/ChangeLog 2007-03-22
18:20:53 UTC (rev 74825)
+++ trunk/mcs/class/corlib/Mono.Security.Cryptography/ChangeLog 2007-03-22
19:16:09 UTC (rev 74826)
@@ -1,3 +1,8 @@
+2007-03-22 Sebastien Pouliot <[EMAIL PROTECTED]>
+
+ * SymmetricTransform.cs: Before 2.0 an IndexOutOfRangeException was
+ thrown (for all unmanaged transforms) in case of an overflow.
+
2007-03-05 Sebastien Pouliot <[EMAIL PROTECTED]>
* SymmetricTransform.cs: Fix KeepLastBlock to be true for decryption
Modified:
trunk/mcs/class/corlib/Mono.Security.Cryptography/SymmetricTransform.cs
===================================================================
--- trunk/mcs/class/corlib/Mono.Security.Cryptography/SymmetricTransform.cs
2007-03-22 18:20:53 UTC (rev 74825)
+++ trunk/mcs/class/corlib/Mono.Security.Cryptography/SymmetricTransform.cs
2007-03-22 19:16:09 UTC (rev 74826)
@@ -247,8 +247,13 @@
if (!encrypt && (0 > len) && ((algo.Padding ==
PaddingMode.None) || (algo.Padding == PaddingMode.Zeros))) {
throw new CryptographicException
("outputBuffer", Locale.GetText ("Overflow"));
} else if (KeepLastBlock) {
- if (0 > len + BlockSizeByte)
+ if (0 > len + BlockSizeByte) {
+#if NET_2_0
throw new CryptographicException
("outputBuffer", Locale.GetText ("Overflow"));
+#else
+ throw new IndexOutOfRangeException
(Locale.GetText ("Overflow"));
+#endif
+ }
} else {
if (0 > len) {
// there's a special case if this is
the end of the decryption process
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches