projects
/
GitHub
/
exynos8895
/
android_kernel_samsung_universal8895.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
0f8e94d
)
ath9k: index out of bounds
author
roel
<roel.kluin@gmail.com>
Sun, 10 Apr 2011 19:09:55 +0000
(21:09 +0200)
committer
John W. Linville
<linville@tuxdriver.com>
Tue, 12 Apr 2011 20:59:32 +0000
(16:59 -0400)
Check whether index is within bounds before testing the element
Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/ath/ath9k/rc.c
patch
|
blob
|
blame
|
history
diff --git
a/drivers/net/wireless/ath/ath9k/rc.c
b/drivers/net/wireless/ath/ath9k/rc.c
index a3241cd089b1db84cf60e2d92961dd6426ed9eb7..2a40532126f35c428a990f1cb08b9bb7ce6fda96 100644
(file)
--- a/
drivers/net/wireless/ath/ath9k/rc.c
+++ b/
drivers/net/wireless/ath/ath9k/rc.c
@@
-1092,8
+1092,7
@@
static int ath_rc_get_rateindex(const struct ath_rate_table *rate_table,
if (!(rate->flags & IEEE80211_TX_RC_MCS))
return rate->idx;
- while (rate->idx > mcs_rix_off[i] &&
- i < ARRAY_SIZE(mcs_rix_off)) {
+ while (i < ARRAY_SIZE(mcs_rix_off) && rate->idx > mcs_rix_off[i]) {
rix++; i++;
}