1
0
mirror of https://git.tartarus.org/simon/putty.git synced 2025-01-09 17:38:00 +00:00

Fix mp_mul_add_simple on Visual Studio.

I had forgotten that my VS implementation of BignumADC expected the
carry parameter to be a literal carry _flag_, i.e. a boolean, rather
than a full word of extra data to be added to the sum of the main
input BignumInts a,b. So in one place where I didn't need a separate
carry I had passed one of the data words in the carry slot, which
worked fine on gcc and clang, but VS normalised that argument to 1.

That looks like the only VS bug, though: now I get a clean run of
cryptsuite.py even if it's talking to a VS-built testcrypt.exe.
This commit is contained in:
Simon Tatham 2019-01-11 07:20:27 +00:00
parent fdc4800669
commit 80f2f6e7af

View File

@ -878,7 +878,7 @@ static void mp_mul_add_simple(mp_int *r, mp_int *a, mp_int *b)
}
for (; rq < rend; rq++)
BignumADC(*rq, carry, 0, *rq, carry);
BignumADC(*rq, carry, carry, *rq, 0);
}
}