Index: mcs/class/corlib/Mono.Math/BigInteger.cs =================================================================== --- mcs/class/corlib/Mono.Math/BigInteger.cs (revision 86048) +++ mcs/class/corlib/Mono.Math/BigInteger.cs (working copy) @@ -1574,7 +1574,7 @@ 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; Index: mcs/class/Mono.Security/Mono.Math/BigInteger.cs =================================================================== --- mcs/class/Mono.Security/Mono.Math/BigInteger.cs (revision 86048) +++ mcs/class/Mono.Security/Mono.Math/BigInteger.cs (working copy) @@ -1574,7 +1574,7 @@ 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;