$NetBSD: patch-ca,v 1.1 2007/11/05 11:28:50 drochner Exp $

--- mcs/class/Mono.Security/Mono.Math/BigInteger.cs.orig	2007-11-05 11:47:52.000000000 +0100
+++ mcs/class/Mono.Security/Mono.Math/BigInteger.cs
@@ -1574,7 +1574,7 @@ namespace Mono.Math {
 						uint j = 1;
 
 						// Multiply and add
-						for (; j < m.length; j++) {
+						for (; j < m.length && j < A.length; j++) {
 							c += (ulong)u_i * (ulong)*(mP++) + *(aSP++);
 							*(aDP++) = (uint)c;
 							c >>= 32;
