Re: [PATCH] sonypi: use strscpy() in sonypi_acpi_probe
From: Arnd Bergmann
Date: Fri Apr 24 2026 - 04:35:06 EST
On Fri, Apr 24, 2026, at 09:57, Thorsten Blum wrote:
> strcpy() has been deprecated¹ because it performs no bounds checking on
> the destination buffer, which can lead to buffer overflows. While the
> current code works correctly, replace strcpy() with the safer strscpy()
> to follow secure coding best practices.
>
> ¹ https://www.kernel.org/doc/html/latest/process/deprecated.html#strcpy
>
> Signed-off-by: Thorsten Blum <thorsten.blum@xxxxxxxxx>
> ---
> Based on linux-next and the new function name sonypi_acpi_probe().
Acked-by: Arnd Bergmann <arnd@xxxxxxxx>