wifi: ath9k: avoid using uninitialized array
authorDmitry Antipov <dmantipov@yandex.ru>
Mon, 24 Jul 2023 10:11:07 +0000 (13:11 +0300)
committerKalle Valo <quic_kvalo@quicinc.com>
Tue, 25 Jul 2023 14:28:02 +0000 (17:28 +0300)
In 'ath_tx_count_frames()', 'ba' array may be used uninitialized, so
add 'memset()' call similar to one used in 'ath_tx_complete_aggr()'.

Signed-off-by: Dmitry Antipov <dmantipov@yandex.ru>
Acked-by: Toke Høiland-Jørgensen <toke@toke.dk>
Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com>
Link: https://lore.kernel.org/r/20230620080855.396851-1-dmantipov@yandex.ru
drivers/net/wireless/ath/ath9k/xmit.c

index f6f2ab7a63ffce5aed86d5b1893a4f34c40ce858..8babaaacacf59cd30bd6b29c1e5a79aad4b3de9a 100644 (file)
@@ -466,6 +466,8 @@ static void ath_tx_count_frames(struct ath_softc *sc, struct ath_buf *bf,
        *nframes = 0;
 
        isaggr = bf_isaggr(bf);
+       memset(ba, 0, WME_BA_BMP_SIZE >> 3);
+
        if (isaggr) {
                seq_st = ts->ts_seqnum;
                memcpy(ba, &ts->ba_low, WME_BA_BMP_SIZE >> 3);