Author: truckman Date: Mon May 16 08:07:32 2016 New Revision: 299921 URL: https://svnweb.freebsd.org/changeset/base/299921
Log: Add an assertion to catch a potential underflow in an array index calculation, though this should not happen in the current code. Reported by: Coverity CID: 1008486 MFC after: 3 weeks Modified: head/sbin/ifconfig/ifieee80211.c Modified: head/sbin/ifconfig/ifieee80211.c ============================================================================== --- head/sbin/ifconfig/ifieee80211.c Mon May 16 08:04:40 2016 (r299920) +++ head/sbin/ifconfig/ifieee80211.c Mon May 16 08:07:32 2016 (r299921) @@ -3753,6 +3753,7 @@ list_txpow(int s) /* suppress duplicates as above */ if (isset(reported, c->ic_ieee) && !verbose) { /* XXX we assume duplicates are adjacent */ + assert(achans->ic_nchans > 0); prev = &achans->ic_chans[achans->ic_nchans-1]; /* display highest power on channel */ if (c->ic_maxpower > prev->ic_maxpower) _______________________________________________ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"