mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-01-27 02:02:26 +00:00
Fix bug in Karatsuba multiplication, which affected propagation of a
carry by more than one word. Now the current set of test cases all pass again. [originally from svn r9098]
This commit is contained in:
parent
01d365b626
commit
260cee498e
1
sshbn.c
1
sshbn.c
@ -386,6 +386,7 @@ static void internal_mul(const BignumInt *a, const BignumInt *b,
|
|||||||
carry += c[j];
|
carry += c[j];
|
||||||
c[j] = (BignumInt)carry;
|
c[j] = (BignumInt)carry;
|
||||||
carry >>= BIGNUM_INT_BITS;
|
carry >>= BIGNUM_INT_BITS;
|
||||||
|
j--;
|
||||||
}
|
}
|
||||||
#ifdef KARA_DEBUG
|
#ifdef KARA_DEBUG
|
||||||
printf("ab = 0x");
|
printf("ab = 0x");
|
||||||
|
Loading…
Reference in New Issue
Block a user