[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <6bf23d51-7b71-4055-b6c5-a75a6d000b26@roeck-us.net>
Date: Mon, 12 Jan 2026 13:27:23 -0800
From: Guenter Roeck <linux@...ck-us.net>
To: Szymon Wilczek <szymonwilczek@....com>
Cc: linux-hwmon@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] hwmon: (acpi_power_meter) Replace deprecated strcpy()
with strscpy()
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@....com>
> Reviewed-by: lihuisong@...wei.com
Applied.
Thanks,
Guenter
Powered by blists - more mailing lists