Date: Wed, 28 Jan 2009 18:37:46 +0000 (UTC) From: Sam Leffler <sam@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r187834 - head/sys/net80211 Message-ID: <200901281837.n0SIbk56028786@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: sam Date: Wed Jan 28 18:37:46 2009 New Revision: 187834 URL: http://svn.freebsd.org/changeset/base/187834 Log: change null_getradiocaps to return the actual count of channels instead of the true number; otherwise the caller may use the count to do things with the data it should not (e.g. sort the channel table) Modified: head/sys/net80211/ieee80211_regdomain.c Modified: head/sys/net80211/ieee80211_regdomain.c ============================================================================== --- head/sys/net80211/ieee80211_regdomain.c Wed Jan 28 18:14:24 2009 (r187833) +++ head/sys/net80211/ieee80211_regdomain.c Wed Jan 28 18:37:46 2009 (r187834) @@ -48,10 +48,10 @@ null_getradiocaps(struct ieee80211com *i int *n, struct ieee80211_channel *c) { /* just feed back the current channel list */ - *n = ic->ic_nchans; /* XXX return count copied? */ if (maxchan > ic->ic_nchans) maxchan = ic->ic_nchans; memcpy(c, ic->ic_channels, maxchan*sizeof(struct ieee80211_channel)); + *n = maxchan; } static int
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200901281837.n0SIbk56028786>