summaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorDan Carpenter <error27@gmail.com>2011-07-29 11:52:18 +0300
committerJohn W. Linville <linville@tuxdriver.com>2011-08-01 13:46:46 -0400
commit84404623da45aac04595a8f5760a58df0e955d87 (patch)
treeaebf0450b90994be5e51aa9486770a31068c1e40 /net
parent17e859a899712d16c3e70b045d61ad9e02c53f8a (diff)
downloadop-kernel-dev-84404623da45aac04595a8f5760a58df0e955d87.zip
op-kernel-dev-84404623da45aac04595a8f5760a58df0e955d87.tar.gz
cfg80211: off by one in nl80211_trigger_scan()
The test is off by one so we'd read past the end of the wiphy->bands[] array on the next line. Signed-off-by: Dan Carpenter <error27@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net')
-rw-r--r--net/wireless/nl80211.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c
index 28d2aa1..e83e7fe 100644
--- a/net/wireless/nl80211.c
+++ b/net/wireless/nl80211.c
@@ -3464,7 +3464,7 @@ static int nl80211_trigger_scan(struct sk_buff *skb, struct genl_info *info)
tmp) {
enum ieee80211_band band = nla_type(attr);
- if (band < 0 || band > IEEE80211_NUM_BANDS) {
+ if (band < 0 || band >= IEEE80211_NUM_BANDS) {
err = -EINVAL;
goto out_free;
}
OpenPOWER on IntegriCloud