Re: [PATCH] nfc: s3fwrn5: Prefer strscpy() over strcpy()
From: Krzysztof Kozlowski <krzk@kernel.org>
Date: 2024-10-30 05:57:33
Also in:
lkml
From: Krzysztof Kozlowski <krzk@kernel.org>
Date: 2024-10-30 05:57:33
Also in:
lkml
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 <redacted> Best regards, Krzysztof