[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <e50730c5-3203-4aec-ab08-b5965dda71af@roeck-us.net>
Date: Mon, 14 Apr 2025 15:41:02 -0700
From: Guenter Roeck <linux@...ck-us.net>
To: Yacov Simhony <ysimhony@...il.com>, jdelvare@...e.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 4/14/25 15:01, Yacov Simhony wrote:
> Use strscpy() instead of strcpy() to prevent potential buffer overflows
> in acpi_device_name() and acpi_device_class(), which point to fixed-size
> buffers.
>
> This change improves safety and aligns with current kernel cleanup efforts.
ACPI_POWER_METER_DEVICE_NAME and ACPI_POWER_METER_CLASS are constant strings.
There is no danger of buffer overflows. There is no safety improvement.
We should concentrate on fixing real problems, not imaginary ones.
Guenter
Powered by blists - more mailing lists