simon-git: putty (master): Simon Tatham
Commits to Tartarus hosted VCS
tartarus-commits at lists.tartarus.org
Sun Jan 6 19:21:42 GMT 2019
TL;DR:
8024b55e mp_divmod_into: don't confuse uint64_t with BignumInt.
6fc50d40 Fix 32-bit-only bug in mp_{eq,hs}_integer.
Repository: https://git.tartarus.org/simon/putty.git
On the web: https://git.tartarus.org/?p=simon/putty.git
Branch updated: master
Committer: Simon Tatham <anakin at pobox.com>
Date: 2019-01-06 19:21:42
commit 8024b55ea6b852d9640ab5f35cf91e89326c9f95
web diff https://git.tartarus.org/?p=simon/putty.git;a=commitdiff;h=8024b55ea6b852d9640ab5f35cf91e89326c9f95;hp=8e399f9aa7f841ede085c2ea2dbe2f2382f4dd06
Author: Simon Tatham <anakin at pobox.com>
Date: Sun Jan 6 18:46:18 2019 +0000
mp_divmod_into: don't confuse uint64_t with BignumInt.
A major advantage of the new testcrypt system _not_ being written as a
native-code Python module in the usual way is that it makes it very
easy to recompile testcrypt in a non-default way, such as with -m32,
and still run the same tests via the same Python module.
But I hadn't actually _done_ that until now, and now that I do, the
test suite has picked up a couple of bugs. When computing the initial
reciprocal approximation in mp_divmod_into, I did a lot of work on
explicit uint64_t, but did it in a way that used BIGNUM_INT_BITS as
the number's bit size instead of the constant 64, and cast several
things absentmindedly to BignumInt. And because I'd only tested on a
platform where those are the same type anyway, I didn't spot it.
mpint.c | 22 ++++++++++++++--------
1 file changed, 14 insertions(+), 8 deletions(-)
commit 6fc50d402e74dcf2de71a64785ddc4d79856127e
web diff https://git.tartarus.org/?p=simon/putty.git;a=commitdiff;h=6fc50d402e74dcf2de71a64785ddc4d79856127e;hp=8024b55ea6b852d9640ab5f35cf91e89326c9f95
Author: Simon Tatham <anakin at pobox.com>
Date: Sun Jan 6 19:15:35 2019 +0000
Fix 32-bit-only bug in mp_{eq,hs}_integer.
I got the maximum shift count _completely_ wrong when trying to work
out whether each word should be compared against part of the input
uintmax_t: I measured it in bytes rather than bits _and_ applied it to
the wrong type. Ahem.
mpint.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
More information about the tartarus-commits
mailing list