mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-08-31 03:35:32 -04:00
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:
committed by
Ping-Ke Shih
parent
92827aaf07
commit
1908534deb
@@ -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];
|
||||
|
||||
Reference in New Issue
Block a user