Re: [PATCH] hwmon: (acpi_power_meter) Replace deprecated strcpy() with strscpy()

From: Guenter Roeck

Date: Mon Jan 12 2026 - 16:27:25 EST


On Sat, Dec 20, 2025 at 06:30:41PM +0100, Szymon Wilczek wrote:
> strcpy() performs no bounds checking on the destination buffer, which
> could result in linear overflows beyond the end of the buffer. Although
> the source strings here are compile-time constants that fit within the
> destination buffers, using strscpy() is the preferred approach as it
> provides bounds checking and aligns with the kernel's deprecated API
> guidelines.
>
> This change converts the remaining strcpy() calls to strscpy(), matching
> the pattern already used throughout other ACPI drivers in
> drivers/acpi/*.c.
>
> Link: https://www.kernel.org/doc/html/latest/process/deprecated.html#strcpy
> Signed-off-by: Szymon Wilczek <szymonwilczek@xxxxxxx>
> Reviewed-by: lihuisong@xxxxxxxxxx

Applied.

Thanks,
Guenter