]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
wifi: rtw89: avoid reading out of bounds when loading TX power FW elements
authorZong-Zhe Yang <kevin_yang@realtek.com>
Mon, 2 Sep 2024 01:58:03 +0000 (09:58 +0800)
committerPing-Ke Shih <pkshih@realtek.com>
Thu, 5 Sep 2024 01:13:44 +0000 (09:13 +0800)
commited2e4bb17a4884cf29c3347353d8aabb7265b46c
treefaace1d1383a3f4542f2820643a26d3a373b8def
parentc9ac071e30ba4f2e770a0705564790502a7b931f
wifi: rtw89: avoid reading out of bounds when loading TX power FW elements

Because the loop-expression will do one more time before getting false from
cond-expression, the original code copied one more entry size beyond valid
region.

Fix it by moving the entry copy to loop-body.

Signed-off-by: Zong-Zhe Yang <kevin_yang@realtek.com>
Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
Link: https://patch.msgid.link/20240902015803.20420-1-pkshih@realtek.com
drivers/net/wireless/realtek/rtw89/core.h