Date: Tue, 7 Jun 2016 16:53:05 +0000 (UTC) From: Don Lewis <truckman@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r301556 - stable/10/sbin/ifconfig Message-ID: <201606071653.u57Gr5A4057162@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: truckman Date: Tue Jun 7 16:53:05 2016 New Revision: 301556 URL: https://svnweb.freebsd.org/changeset/base/301556 Log: MFC r299921 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 Modified: stable/10/sbin/ifconfig/ifieee80211.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sbin/ifconfig/ifieee80211.c ============================================================================== --- stable/10/sbin/ifconfig/ifieee80211.c Tue Jun 7 16:51:56 2016 (r301555) +++ stable/10/sbin/ifconfig/ifieee80211.c Tue Jun 7 16:53:05 2016 (r301556) @@ -3626,6 +3626,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)
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201606071653.u57Gr5A4057162>