* [patch] cfg80211: off by one in nl80211_trigger_scan()
@ 2011-07-29 8:52 Dan Carpenter
0 siblings, 0 replies; only message in thread
From: Dan Carpenter @ 2011-07-29 8:52 UTC (permalink / raw)
To: Johannes Berg
Cc: John W. Linville, David S. Miller, open list:CFG80211 and NL80211,
open list:NETWORKING [GENERAL], kernel-janitors
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>
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;
}
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2011-07-29 8:52 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-07-29 8:52 [patch] cfg80211: off by one in nl80211_trigger_scan() Dan Carpenter
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox