ath9k: Fix error reported by smatch
PATCH 1/1 ath9k: Fix error reported by smatch
From: Sujith Manoharan <[email protected]>
debug_sta.c: ath_debug_rate_stats() error: buffer overflow 'rstats->ht_stats' 24 <= 24
Cc Dan Carpenter <[email protected]>
Signed-off-by Sujith Manoharan <[email protected]>
--- drivers/net/wireless/ath/ath9k/debug_sta.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/wireless/ath/ath9k/debug_sta.c +1 -1
@@ -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 )
Signature · 1 line
1.8.5.2