From: "Miguel García" <miguelgarciaroman8@gmail.com>
To: platform-driver-x86@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, ilpo.jarvinen@linux.intel.com,
krzk@kernel.org, "Miguel García" <miguelgarciaroman8@gmail.com>
Subject: [PATCH v2] platform/x86: surfacepro3_button: replace deprecated strcpy() with strscpy()
Date: Mon, 28 Jul 2025 21:49:42 +0200 [thread overview]
Message-ID: <20250728194942.558194-1-miguelgarciaroman8@gmail.com> (raw)
In-Reply-To: <b925480c-231b-44e5-bf1c-1f18f8abe42d@kernel.org>
Signed-off-by: Miguel García <miguelgarciaroman8@gmail.com>
---
drivers/platform/surface/surfacepro3_button.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/platform/surface/surfacepro3_button.c b/drivers/platform/surface/surfacepro3_button.c
index 2755601f979c..772e107151f6 100644
--- a/drivers/platform/surface/surfacepro3_button.c
+++ b/drivers/platform/surface/surfacepro3_button.c
@@ -211,7 +211,7 @@ static int surface_button_add(struct acpi_device *device)
}
name = acpi_device_name(device);
- strcpy(name, SURFACE_BUTTON_DEVICE_NAME);
+ strscpy(name, SURFACE_BUTTON_DEVICE_NAME, MAX_ACPI_DEVICE_NAME_LEN);
snprintf(button->phys, sizeof(button->phys), "%s/buttons", hid);
input->name = name;
--
2.34.1
next prev parent reply other threads:[~2025-07-28 19:50 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-07-24 7:45 [PATCH] platform/x86: surfacepro3_button: replace deprecated strcpy() with strscpy() Miguel García
2025-07-27 20:32 ` Ilpo Järvinen
2025-07-28 1:47 ` Chen, Yu C
2025-07-28 5:30 ` Krzysztof Kozlowski
2025-07-28 19:49 ` Miguel García [this message]
2025-07-28 20:11 ` [PATCH v3] " Miguel García
2025-08-19 10:00 ` Ilpo Järvinen
2025-07-29 7:38 ` [PATCH] " Miguel García Román
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=20250728194942.558194-1-miguelgarciaroman8@gmail.com \
--to=miguelgarciaroman8@gmail.com \
--cc=ilpo.jarvinen@linux.intel.com \
--cc=krzk@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=platform-driver-x86@vger.kernel.org \
/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;
as well as URLs for NNTP newsgroup(s).