[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20240915183822.34588-8-qasim.majeed20@gmail.com>
Date: Sun, 15 Sep 2024 23:38:20 +0500
From: Muhammad Qasim Abdul Majeed <qasim.majeed20@...il.com>
To: rafael@...nel.org,
lenb@...nel.org,
linux-acpi@...r.kernel.org,
linux-kernel@...r.kernel.org
Cc: Muhammad Qasim Abdul Majeed <qasim.majeed20@...il.com>
Subject: [PATCH 08/10] ACPI: sbshc: Use strscpy instead of strcpy.
Replace strcpy() with strscpy() in the ACPI sbshc driver.
strcpy() has been deprecated because it is generally unsafe.
Eliminating it from the kernel source.
Link: https://github.com/KSPP/linux/issues/88
Signed-off-by: Muhammad Qasim Abdul Majeed <qasim.majeed20@...il.com>
---
drivers/acpi/sbshc.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/acpi/sbshc.c b/drivers/acpi/sbshc.c
index 16f2daaa2c45..7e2ddc74a1f0 100644
--- a/drivers/acpi/sbshc.c
+++ b/drivers/acpi/sbshc.c
@@ -257,8 +257,8 @@ static int acpi_smbus_hc_add(struct acpi_device *device)
return -EIO;
}
- strcpy(acpi_device_name(device), ACPI_SMB_HC_DEVICE_NAME);
- strcpy(acpi_device_class(device), ACPI_SMB_HC_CLASS);
+ strscpy(acpi_device_name(device), ACPI_SMB_HC_DEVICE_NAME);
+ strscpy(acpi_device_class(device), ACPI_SMB_HC_CLASS);
hc = kzalloc(sizeof(struct acpi_smb_hc), GFP_KERNEL);
if (!hc)
--
2.43.0
Powered by blists - more mailing lists