Commit 84404623 authored by Dan Carpenter's avatar Dan Carpenter Committed by John W. Linville

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: default avatarDan Carpenter <error27@gmail.com>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent 17e859a8
......@@ -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;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment