wifi: rtw89: debug: fix off by on in rtw89_ppdu_str()

This > comparison should be >= to avoid an out of bounds access.

Fixes: 419ed7f4a0 ("wifi: rtw89: debug: extend bb_info with TX status and PER")
Signed-off-by: Dan Carpenter <error27@gmail.com>
Acked-by: Ping-Ke Shih <pkshih@realtek.com>
Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
Link: https://patch.msgid.link/aia25i0ds3B6QF6c@stanley.mountain
This commit is contained in:
Dan Carpenter
2026-06-08 15:34:46 +03:00
committed by Ping-Ke Shih
parent 92827aaf07
commit 1908534deb

View File

@@ -4348,7 +4348,7 @@ static const char *rtw89_ppdu_str(struct rtw89_dev *rtwdev, u8 type, u8 subtype)
const struct rtw89_chip_info *chip = rtwdev->chip;
const struct rtw89_ppdu_info *ppdu_info;
if (type > ARRAY_SIZE(rtw89_ppdu_infos))
if (type >= ARRAY_SIZE(rtw89_ppdu_infos))
return "RSVD";
ppdu_info = &rtw89_ppdu_infos[type];