diff options
author | Dan Carpenter <dan.carpenter@oracle.com> | 2012-02-01 02:42:11 -0500 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2012-02-06 14:55:41 -0500 |
commit | 910570b5f4dbf75b73389010704ca6442a767a41 (patch) | |
tree | 6c3c581f672492906ebf5b4c34adc307e06aa5a3 /net/mac80211/rate.c | |
parent | d486a5b4996d2fffd10098725781f2c5690774bc (diff) |
mac80211: off by one in mcs mask handling
"ridx" is used as an index into the mcs_mask[] array which has
IEEE80211_HT_MCS_MASK_LEN elements.
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net/mac80211/rate.c')
-rw-r--r-- | net/mac80211/rate.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/mac80211/rate.c b/net/mac80211/rate.c index 3fef26d8898a..22fc28e9026e 100644 --- a/net/mac80211/rate.c +++ b/net/mac80211/rate.c | |||
@@ -324,7 +324,7 @@ static bool rate_idx_match_mcs_mask(struct ieee80211_tx_rate *rate, | |||
324 | rbit = rate->idx % 8; | 324 | rbit = rate->idx % 8; |
325 | 325 | ||
326 | /* sanity check */ | 326 | /* sanity check */ |
327 | if (ridx < 0 || ridx > IEEE80211_HT_MCS_MASK_LEN) | 327 | if (ridx < 0 || ridx >= IEEE80211_HT_MCS_MASK_LEN) |
328 | return false; | 328 | return false; |
329 | 329 | ||
330 | /* See whether the selected rate or anything below it is allowed. */ | 330 | /* See whether the selected rate or anything below it is allowed. */ |