Author: spouliot
Date: 2007-01-03 12:19:15 -0500 (Wed, 03 Jan 2007)
New Revision: 70429
Modified:
trunk/mcs/class/Mono.Security/Mono.Security.Cryptography/ChangeLog
trunk/mcs/class/Mono.Security/Mono.Security.Cryptography/SymmetricTransform.cs
Log:
2007-01-03 Sebastien Pouliot <[EMAIL PROTECTED]>
* SymmetricTransform.cs: Reduce inputCount if larger than the output
data can hold. Fix bug #80439.
Modified: trunk/mcs/class/Mono.Security/Mono.Security.Cryptography/ChangeLog
===================================================================
--- trunk/mcs/class/Mono.Security/Mono.Security.Cryptography/ChangeLog
2007-01-03 17:17:30 UTC (rev 70428)
+++ trunk/mcs/class/Mono.Security/Mono.Security.Cryptography/ChangeLog
2007-01-03 17:19:15 UTC (rev 70429)
@@ -1,3 +1,8 @@
+2007-01-03 Sebastien Pouliot <[EMAIL PROTECTED]>
+
+ * SymmetricTransform.cs: Reduce inputCount if larger than the output
+ data can hold. Fix bug #80439.
+
2006-12-11 Sebastien Pouliot <[EMAIL PROTECTED]>
* PKCS8.cs: Normalize the private key X integer, not it's ASN.1
Modified:
trunk/mcs/class/Mono.Security/Mono.Security.Cryptography/SymmetricTransform.cs
===================================================================
---
trunk/mcs/class/Mono.Security/Mono.Security.Cryptography/SymmetricTransform.cs
2007-01-03 17:17:30 UTC (rev 70428)
+++
trunk/mcs/class/Mono.Security/Mono.Security.Cryptography/SymmetricTransform.cs
2007-01-03 17:19:15 UTC (rev 70429)
@@ -242,8 +242,8 @@
if (outputOffset < 0)
throw new ArgumentOutOfRangeException
("outputOffset", "< 0");
// ordered to avoid possible integer overflow
- if (outputOffset > outputBuffer.Length - inputCount)
- throw new ArgumentException ("outputBuffer",
Locale.GetText ("Overflow"));
+ if (outputOffset > outputBuffer.Length - inputCount)
+ inputCount = outputBuffer.Length - outputOffset;
return InternalTransformBlock (inputBuffer,
inputOffset, inputCount, outputBuffer, outputOffset);
}
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches