From 910570b5f4dbf75b73389010704ca6442a767a41 Mon Sep 17 00:00:00 2001 From: Dan Carpenter Date: Wed, 1 Feb 2012 10:42:11 +0300 Subject: 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 Signed-off-by: John W. Linville --- net/mac80211/rate.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'net/mac80211/rate.c') diff --git a/net/mac80211/rate.c b/net/mac80211/rate.c index 3fef26d8898..22fc28e9026 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, rbit = rate->idx % 8; /* sanity check */ - if (ridx < 0 || ridx > IEEE80211_HT_MCS_MASK_LEN) + if (ridx < 0 || ridx >= IEEE80211_HT_MCS_MASK_LEN) return false; /* See whether the selected rate or anything below it is allowed. */ -- cgit v1.2.3-70-g09d2