]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
To reserve space for 65536 bits, allocate
authorRobert Drehmel <robert@FreeBSD.org>
Fri, 9 May 2003 09:11:27 +0000 (09:11 +0000)
committerRobert Drehmel <robert@FreeBSD.org>
Fri, 9 May 2003 09:11:27 +0000 (09:11 +0000)
commit9efed1e6e238237afa49d80cb94f720c76c69e3e
treefabaaa6fba775cbc9fcb9f398345133335c38a7a
parente1519c7c55e5f349dd54fc07da8d929734b87ed9
To reserve space for 65536 bits, allocate
65536 / (sizeof(int) * CHAR_BITS) `int's instead of
65536 / (sizeof(int) * CHAR_BITS) bytes to avoid a possible
segmentation fault if ports above 16383 are specified via the
-p option on a platform with 4 byte wide ints.

Approved by: re (bmah)
Reported by: Marco Wertejuk <wertejuk@mwcis.com>
usr.bin/sockstat/sockstat.c