diff options
author | bde <bde@FreeBSD.org> | 1998-07-13 11:53:59 +0000 |
---|---|---|
committer | bde <bde@FreeBSD.org> | 1998-07-13 11:53:59 +0000 |
commit | d16ff5c40096a2af9f99118e0c672aba53e77fcd (patch) | |
tree | e20ea2ed11cfbe06db0b371b1038a4edc5da1bef /lib/libc | |
parent | b384a06abb90f7bb9d5b255c124ec54539f2da85 (diff) | |
download | FreeBSD-src-d16ff5c40096a2af9f99118e0c672aba53e77fcd.zip FreeBSD-src-d16ff5c40096a2af9f99118e0c672aba53e77fcd.tar.gz |
Fixed overflow and sign extension bugs in
`len = min(so->so_snd.sb_cc, win) - off;'. min() has type u_int
and `off' has type int, so when min() is 0 and `off' is 1, the RHS
overflows to 0U - 1 = UINT_MAX. `len' has type long, so when
sizeof(long) == sizeof(int), the LHS normally overflows to to the
correct value of -1, but when sizeof(long) > sizeof(int), the LHS
is UINT_MAX.
Fixed some u_long's that should have been fixed-sized types.
Diffstat (limited to 'lib/libc')
0 files changed, 0 insertions, 0 deletions