提交 1908861f 编写于 作者: S Sujith Manoharan 提交者: John W. Linville

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: NSujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
上级 bb350711
......@@ -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)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册