diff options
| author | Dan Carpenter <error27@gmail.com> | 2026-06-08 15:34:46 +0300 |
|---|---|---|
| committer | Ping-Ke Shih <pkshih@realtek.com> | 2026-07-03 10:16:39 +0800 |
| commit | 1908534deb53a018580309be84a4f7dcc9cb1af3 (patch) | |
| tree | 65bbdeaa8baea6cf6df1c8f9eb80dbe74e4fdd24 | |
| parent | 92827aaf07ceeb1db93a847c287f44f2ae7cda41 (diff) | |
wifi: rtw89: debug: fix off by on in rtw89_ppdu_str()
This > comparison should be >= to avoid an out of bounds access.
Fixes: 419ed7f4a053 ("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
| -rw-r--r-- | drivers/net/wireless/realtek/rtw89/debug.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/wireless/realtek/rtw89/debug.c b/drivers/net/wireless/realtek/rtw89/debug.c index 8f5af873e09f..5786120602ab 100644 --- a/drivers/net/wireless/realtek/rtw89/debug.c +++ b/drivers/net/wireless/realtek/rtw89/debug.c @@ -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]; |
