Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 1908861f authored by Sujith Manoharan's avatar Sujith Manoharan Committed by John W. Linville
Browse files

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: default avatarSujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent bb350711
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -128,7 +128,7 @@ void ath_debug_rate_stats(struct ath_softc *sc,
	rxs = IEEE80211_SKB_RXCB(skb);
	rxs = IEEE80211_SKB_RXCB(skb);


	if (IS_HT_RATE(rs->rs_rate)) {
	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;
			goto exit;


		if (rxs->flag & RX_FLAG_40MHZ)
		if (rxs->flag & RX_FLAG_40MHZ)