]> asedeno.scripts.mit.edu Git - PuTTY.git/commit
Improve integer-type hygiene in bignum code.
authorSimon Tatham <anakin@pobox.com>
Mon, 8 Jun 2015 18:23:48 +0000 (19:23 +0100)
committerSimon Tatham <anakin@pobox.com>
Sat, 20 Jun 2015 11:47:43 +0000 (12:47 +0100)
commit2725a51d3c44d1eb9760f08b8482db25d9401a86
treec6b4679637956f19764543a702f6fdff8e2a2953
parent0aa18b242e8ddc0ae4646a64af62d3648cea2e4a
Improve integer-type hygiene in bignum code.

In many places I was using an 'unsigned int', or an implicit int by
virtue of writing an undecorated integer literal, where what was
really wanted was a BignumInt. In particular, this substitution breaks
in any situation where BignumInt is _larger_ than unsigned - which it
is shortly about to be.

(cherry picked from commit e28b35b0a39de28fa2f71aa78071d1ad62deaceb)

Conflicts:
sshbn.c
sshccp.c

Cherry-picker's notes: the conflicts were because the original commit
also modified new code (sshccp.c for dedicated Poly1305 arithmetic
routines, sshbn.c for a few bignum functions introduced on trunk for
various pieces of new crypto) which doesn't exist on this branch.
sshbn.c