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>
Esse commit está contido em:
Dan Carpenter
2012-02-01 10:42:11 +03:00
commit de John W. Linville
commit 910570b5f4
2 arquivos alterados com 2 adições e 2 exclusões

Ver arquivo

@@ -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 */