]> asedeno.scripts.mit.edu Git - PuTTY.git/blobdiff - sshprime.c
Inhibit the Serial configuration panel in mid-session if the session
[PuTTY.git] / sshprime.c
index b48ce1a33ff1849a08fd36e48a30f9a6d7b276b4..070eb98aa5ff7bd51f29be1b54169270bf2eb9a5 100644 (file)
@@ -1255,6 +1255,10 @@ Bignum primegen(int bits, int modulus, int residue, Bignum factor,
     moduli[NPRIMES] = modulus;
     residues[NPRIMES] = (bignum_mod_short(p, (unsigned short) modulus)
                         + modulus - residue);
+    if (factor)
+       multipliers[NPRIMES] = bignum_mod_short(factor, modulus);
+    else
+       multipliers[NPRIMES] = 1;
     delta = 0;
     while (1) {
        for (i = 0; i < (sizeof(moduli) / sizeof(*moduli)); i++)
@@ -1378,6 +1382,7 @@ Bignum primegen(int bits, int modulus, int residue, Bignum factor,
         * It didn't. Therefore, w is a witness for the
         * compositeness of p.
         */
+       freebn(wqp);
        freebn(p);
        freebn(pm1);
        freebn(q);