]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
staging: rtl8723bs: fix fortify warnings by using struct_group
authoryingche <zxcv2569763104@gmail.com>
Fri, 29 Aug 2025 04:09:06 +0000 (12:09 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 6 Sep 2025 13:55:38 +0000 (15:55 +0200)
commit0bbf8fb9e3e624d44b536de71a93f995b7edc7a5
treed784cb088b3fcb4a1aec3e5e446f05e45e422e0d
parent9d78ee44a9d717db66156f40856f201c8618f2b0
staging: rtl8723bs: fix fortify warnings by using struct_group

Fix fortify_memcpy_chk warnings in rtw_BIP_verify() and
rtw_mgmt_xmitframe_coalesce() functions by using struct_group
to access consecutive address fields.

Changed memcpy calls to use &hdr->addrs instead of hdr->addr1
when copying 18 bytes (addr1 + addr2 + addr3).

This resolves 'detected read beyond size of field' warnings
by using the proper struct_group mechanism as suggested by
the compiler.

Signed-off-by: yingche <zxcv2569763104@gmail.com>
Reviewed-by: Dan Carpenter <dan.carpenter@linaro.org>
Link: https://lore.kernel.org/r/20250829040906.895221-1-zxcv2569763104@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/rtl8723bs/core/rtw_security.c
drivers/staging/rtl8723bs/core/rtw_xmit.c