Author: spouliot
Date: 2005-04-18 08:57:51 -0400 (Mon, 18 Apr 2005)
New Revision: 43212

Modified:
   
branches/mono-1-0/mcs/class/Mono.Security/Mono.Security.Cryptography/ChangeLog
   
branches/mono-1-0/mcs/class/Mono.Security/Mono.Security.Cryptography/SymmetricTransform.cs
Log:
2005-04-18  Sebastien Pouliot  <[EMAIL PROTECTED]>

        * SymmetricTransform.cs: Fixed a division by zero if someone changes 
        the feedback value to 0.



Modified: 
branches/mono-1-0/mcs/class/Mono.Security/Mono.Security.Cryptography/ChangeLog
===================================================================
--- 
branches/mono-1-0/mcs/class/Mono.Security/Mono.Security.Cryptography/ChangeLog  
    2005-04-18 12:54:46 UTC (rev 43211)
+++ 
branches/mono-1-0/mcs/class/Mono.Security/Mono.Security.Cryptography/ChangeLog  
    2005-04-18 12:57:51 UTC (rev 43212)
@@ -1,3 +1,8 @@
+2005-04-18  Sebastien Pouliot  <[EMAIL PROTECTED]>
+
+       * SymmetricTransform.cs: Fixed a division by zero if someone changes 
+       the feedback value to 0.
+
 2004-12-06  Sebastien Pouliot  <[EMAIL PROTECTED]>
 
        * RSAManaged.cs: Implement key blinding for RSA decryption with, or

Modified: 
branches/mono-1-0/mcs/class/Mono.Security/Mono.Security.Cryptography/SymmetricTransform.cs
===================================================================
--- 
branches/mono-1-0/mcs/class/Mono.Security/Mono.Security.Cryptography/SymmetricTransform.cs
  2005-04-18 12:54:46 UTC (rev 43211)
+++ 
branches/mono-1-0/mcs/class/Mono.Security/Mono.Security.Cryptography/SymmetricTransform.cs
  2005-04-18 12:57:51 UTC (rev 43212)
@@ -6,10 +6,8 @@
 //     Sebastien Pouliot <[EMAIL PROTECTED]>
 //
 // Portions (C) 2002, 2003 Motus Technologies Inc. (http://www.motus.com)
-// (C) 2004 Novell (http://www.novell.com)
+// Copyright (C) 2004-2005 Novell, Inc (http://www.novell.com)
 //
-
-//
 // Permission is hereby granted, free of charge, to any person obtaining
 // a copy of this software and associated documentation files (the
 // "Software"), to deal in the Software without restriction, including
@@ -30,29 +28,6 @@
 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 //
 
-//
-// Copyright (C) 2004 Novell, Inc (http://www.novell.com)
-//
-// Permission is hereby granted, free of charge, to any person obtaining
-// a copy of this software and associated documentation files (the
-// "Software"), to deal in the Software without restriction, including
-// without limitation the rights to use, copy, modify, merge, publish,
-// distribute, sublicense, and/or sell copies of the Software, and to
-// permit persons to whom the Software is furnished to do so, subject to
-// the following conditions:
-// 
-// The above copyright notice and this permission notice shall be
-// included in all copies or substantial portions of the Software.
-// 
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-//
-
 using System;
 using System.Security.Cryptography;
 
@@ -90,7 +65,8 @@
                        Buffer.BlockCopy (rgbIV, 0, temp, 0, BlockSizeByte);
                        temp2 = new byte [BlockSizeByte];
                        FeedBackByte = (algo.FeedbackSize >> 3);
-                       FeedBackIter = (int) BlockSizeByte / FeedBackByte;
+                       if (FeedBackByte != 0)
+                               FeedBackIter = (int) BlockSizeByte / 
FeedBackByte;
                        // transform buffers
                        workBuff = new byte [BlockSizeByte];
                        workout =  new byte [BlockSizeByte];

_______________________________________________
Mono-patches maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches

Reply via email to