提交 84404623 编写于 作者: D Dan Carpenter 提交者: 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: NDan Carpenter <error27@gmail.com>
Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
上级 17e859a8
...@@ -3464,7 +3464,7 @@ static int nl80211_trigger_scan(struct sk_buff *skb, struct genl_info *info) ...@@ -3464,7 +3464,7 @@ static int nl80211_trigger_scan(struct sk_buff *skb, struct genl_info *info)
tmp) { tmp) {
enum ieee80211_band band = nla_type(attr); enum ieee80211_band band = nla_type(attr);
if (band < 0 || band > IEEE80211_NUM_BANDS) { if (band < 0 || band >= IEEE80211_NUM_BANDS) {
err = -EINVAL; err = -EINVAL;
goto out_free; goto out_free;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册