Unverified Commit 79f8ce64 authored by openeuler-ci-bot's avatar openeuler-ci-bot Committed by Gitee
Browse files

!5466 wifi: ath9k: Fix potential array-index-out-of-bounds read in ath9k_htc_txstatus()

parents 1a79212e 0a990ed1
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -647,9 +647,10 @@ void ath9k_htc_txstatus(struct ath9k_htc_priv *priv, void *wmi_event)
	struct ath9k_htc_tx_event *tx_pend;
	int i;

	for (i = 0; i < txs->cnt; i++) {
		WARN_ON(txs->cnt > HTC_MAX_TX_STATUS);
	if (WARN_ON_ONCE(txs->cnt > HTC_MAX_TX_STATUS))
		return;

	for (i = 0; i < txs->cnt; i++) {
		__txs = &txs->txstatus[i];

		skb = ath9k_htc_tx_get_packet(priv, __txs);