HomeFreeBSD

ifconfig: prevent some improbable signed integer overflows.

Description

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

Details

Provenance
pfgAuthored on
Parents
rS298555: Tag netcat from OpenBSD 5.9.
Branches
Unknown
Tags
Unknown