summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/ath/ath9k/debug_sta.c
diff options
context:
space:
mode:
authorSujith Manoharan <c_manoha@qca.qualcomm.com>2014-01-14 09:22:36 +0530
committerJohn W. Linville <linville@tuxdriver.com>2014-01-16 14:55:41 -0500
commit1908861f2fb072446eabbdc4a01c3bec40ed2f7c (patch)
tree1dfaf11712e231d2e0aa5b73ec9c07f98713e415 /drivers/net/wireless/ath/ath9k/debug_sta.c
parentbb350711ecb86568468b497d0ecd5c3fd7b45b1b (diff)
downloadlinux-stable-1908861f2fb072446eabbdc4a01c3bec40ed2f7c.tar.gz
linux-stable-1908861f2fb072446eabbdc4a01c3bec40ed2f7c.tar.bz2
linux-stable-1908861f2fb072446eabbdc4a01c3bec40ed2f7c.zip
ath9k: Fix error reported by smatch
debug_sta.c: ath_debug_rate_stats() error: buffer overflow 'rstats->ht_stats' 24 <= 24 Cc: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/ath/ath9k/debug_sta.c')
-rw-r--r--drivers/net/wireless/ath/ath9k/debug_sta.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/wireless/ath/ath9k/debug_sta.c b/drivers/net/wireless/ath/ath9k/debug_sta.c
index d33cc88a5849..d76e6e0120d2 100644
--- a/drivers/net/wireless/ath/ath9k/debug_sta.c
+++ b/drivers/net/wireless/ath/ath9k/debug_sta.c
@@ -128,7 +128,7 @@ void ath_debug_rate_stats(struct ath_softc *sc,
rxs = IEEE80211_SKB_RXCB(skb);
if (IS_HT_RATE(rs->rs_rate)) {
- if (rxs->rate_idx > ARRAY_SIZE(rstats->ht_stats))
+ if (rxs->rate_idx >= ARRAY_SIZE(rstats->ht_stats))
goto exit;
if (rxs->flag & RX_FLAG_40MHZ)