]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
ifconfig: prevent some improbable signed integer overflows.
authorpfg <pfg@FreeBSD.org>
Mon, 25 Apr 2016 00:41:23 +0000 (00:41 +0000)
committerpfg <pfg@FreeBSD.org>
Mon, 25 Apr 2016 00:41:23 +0000 (00:41 +0000)
commit1464f257c1c2335406c3ecb04fb297f431ef6a47
tree2a3bcb65296b97cab46aede17bfa91b0da4d5146
parent241a3b76d8136a83d5c3d5f5c144f5a192b56cb8
ifconfig: prevent some improbable signed integer overflows.

ic_nchans, from struct:ieee80211req_chaninfo, is an unsigned int.
Use an unsigned index to prevent overflowing the index.

Adopt unsigned integers in other cases where it is useful
to be aware of the unsigned quantities and there is no
risk of the values being negative.

MFC after: 1 week
sbin/ifconfig/ifieee80211.c