[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <aLE3JgL4WQW2BA5k@stanley.mountain>
Date: Fri, 29 Aug 2025 08:14:14 +0300
From: Dan Carpenter <dan.carpenter@...aro.org>
To: yingche <zxcv2569763104@...il.com>
Cc: gregkh@...uxfoundation.org, linux-staging@...ts.linux.dev,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2] staging: rtl8723bs: fix fortify warnings by using
struct_group
On Fri, Aug 29, 2025 at 12:09:06PM +0800, yingche wrote:
> 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@...il.com>
>
> ---
> v2: Use sizeof() instead of magic number 18 (Dan Carpenter)
Thanks!
Reviewed-by: Dan Carpenter <dan.carpenter@...aro.org>
regards,
dan carpenter
Powered by blists - more mailing lists