Re: [PATCH] nfc: s3fwrn5: Prefer strscpy() over strcpy()

From: Krzysztof Kozlowski
Date: Wed Oct 30 2024 - 01:57:56 EST


On 29/10/2024 23:16, Abdul Rahim wrote:
> strcpy() performs no bounds checking on the destination buffer. This
> could result in linear overflows beyond the end of the buffer, leading
> to all kinds of misbehaviors [1]
>
> this fixes checkpatch warning:
> WARNING: Prefer strscpy over strcpy

You should explain why it is safe to omit the destination buffer size.

Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@xxxxxxxxxx>

Best regards,
Krzysztof