diff options
author | Dan Carpenter <dan.carpenter@oracle.com> | 2012-02-01 10:42:11 +0300 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2012-02-06 14:55:41 -0500 |
commit | 910570b5f4dbf75b73389010704ca6442a767a41 (patch) | |
tree | 6c3c581f672492906ebf5b4c34adc307e06aa5a3 /net/wireless | |
parent | d486a5b4996d2fffd10098725781f2c5690774bc (diff) | |
download | linux-stable-910570b5f4dbf75b73389010704ca6442a767a41.tar.gz linux-stable-910570b5f4dbf75b73389010704ca6442a767a41.tar.bz2 linux-stable-910570b5f4dbf75b73389010704ca6442a767a41.zip |
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/wireless')
-rw-r--r-- | net/wireless/nl80211.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c index f1681e2c5949..fe2747653564 100644 --- a/net/wireless/nl80211.c +++ b/net/wireless/nl80211.c @@ -5410,7 +5410,7 @@ static bool ht_rateset_to_mask(struct ieee80211_supported_band *sband, rbit = BIT(rates[i] % 8); /* check validity */ - if ((ridx < 0) || (ridx > IEEE80211_HT_MCS_MASK_LEN)) + if ((ridx < 0) || (ridx >= IEEE80211_HT_MCS_MASK_LEN)) return false; /* check availability */ |