mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Guenter Roeck <linux@roeck-us.net>
To: Yacov Simhony <ysimhony@gmail.com>, jdelvare@suse.com
Cc: linux-hwmon@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] hwmon: acpi_power_meter: replace deprecated strcpy() with strscpy()
Date: Mon, 14 Apr 2025 15:41:02 -0700	[thread overview]
Message-ID: <e50730c5-3203-4aec-ab08-b5965dda71af@roeck-us.net> (raw)
In-Reply-To: <20250414220145.4111-1-ysimhony@gmail.com>

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


  reply	other threads:[~2025-04-14 22:41 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-04-14 22:01 Yacov Simhony
2025-04-14 22:41 ` Guenter Roeck [this message]
2025-12-20 17:30 [PATCH] hwmon: (acpi_power_meter) Replace " Szymon Wilczek
2025-12-23  1:31 ` lihuisong (C)
2026-01-12 21:27 ` Guenter Roeck

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=e50730c5-3203-4aec-ab08-b5965dda71af@roeck-us.net \
    --to=linux@roeck-us.net \
    --cc=jdelvare@suse.com \
    --cc=linux-hwmon@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=ysimhony@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®