Re: [PATCH net-next v1] NFC: nfcmrvl: Replace strcpy() with strscpy()
From: Simon Horman
Date: Tue Mar 03 2026 - 15:56:16 EST
On Sun, Mar 01, 2026 at 03:43:45PM +0100, tomasz.unger@xxxxxxxx wrote:
> From: Tomasz Unger <tomasz.unger@xxxxxxxx>
>
> Replace strcpy() with strscpy() which limits the copy to the size of
> the destination buffer. Since fw_dnld->name is an array, the
> two-argument variant of strscpy() is used - the compiler deduces
> the buffer size automatically.
>
> This is a defensive cleanup replacing the deprecated strcpy()
> with the preferred strscpy().
>
> Signed-off-by: Tomasz Unger <tomasz.unger@xxxxxxxx>
Reviewed-by: Simon Horman <horms@xxxxxxxxxx>