]> asedeno.scripts.mit.edu Git - PuTTY.git/commit - misc.c
Tighten up a lot of casts from unsigned to int which are read by one
authorSimon Tatham <anakin@pobox.com>
Sun, 14 Jul 2013 10:45:54 +0000 (10:45 +0000)
committerSimon Tatham <anakin@pobox.com>
Sun, 14 Jul 2013 10:45:54 +0000 (10:45 +0000)
commit896bb7c74d06200d92f846d666224e3f9c80b634
tree2c81596acb115b1e60174996fdc4e1a0554e1630
parent1662a2f6cf015ff05de76d01e7a80e0e4a5756d0
Tighten up a lot of casts from unsigned to int which are read by one
of the GET_32BIT macros and then used as length fields. Missing bounds
checks against zero have been added, and also I've introduced a helper
function toint() which casts from unsigned to int in such a way as to
avoid C undefined behaviour, since I'm not sure I trust compilers any
more to do the obviously sensible thing.

[originally from svn r9918]
conf.c
import.c
misc.c
misc.h
sftp.c
ssh.c
sshdss.c
sshpubk.c
sshrsa.c
unix/uxagentc.c
windows/winpgnt.c