X-Git-Url: https://git.distorted.org.uk/u/mdw/putty/blobdiff_plain/c523f55f691aeb12b77d1e779707bea43eb242dd..9bb8630af3373e7bbf594bfeda731585684e1b69:/sshbn.c diff --git a/sshbn.c b/sshbn.c index d0608a3a..7fe0309a 100644 --- a/sshbn.c +++ b/sshbn.c @@ -133,7 +133,7 @@ static void internal_add_shifted(BignumInt *number, int bshift = shift % BIGNUM_INT_BITS; BignumDblInt addend; - addend = n << bshift; + addend = (BignumDblInt)n << bshift; while (addend) { addend += number[word]; @@ -909,6 +909,7 @@ Bignum modinv(Bignum number, Bignum modulus) x = bigmuladd(q, xp, t); sign = -sign; freebn(t); + freebn(q); } freebn(b);