]> asedeno.scripts.mit.edu Git - PuTTY.git/blobdiff - sshbn.c
What was that rogue man-mindepth directive doing in here?
[PuTTY.git] / sshbn.c
diff --git a/sshbn.c b/sshbn.c
index d0608a3ac3213a4db23f6bb8d7c463ee212f638d..7fe0309a03bf285a019d6f241442f26f4277e232 100644 (file)
--- 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);