Re: [PATCH] net: ethernet: broadcom: replace strcpy with strscpy

From: ShiHao

Date: Fri Nov 14 2025 - 04:07:32 EST


On Thu, Nov 13, 2025 at 07:22:18PM +0000, David Laight wrote:

> No one really knows that TG3_BPN_SIZE is in any way related to the destination.
> So this doesn't actually make the code that much better at all.
>
> Since tp->board_part_number is an array and "BCM5717" a constant I suspect
> there is already a compile-time check that the string fits.
> The strcpy() will also be converted to a memcpy().
>
> So all, in all, this makes the code worse on several fronts.
>
> Davidi


Okay. I got it thanks for your time david.