mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-05-09 03:10:30 -04:00
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, so it is better to eliminate it from the kernel source. Link: https://github.com/KSPP/linux/issues/88 Signed-off-by: Muhammad Qasim Abdul Majeed <qasim.majeed20@gmail.com> Link: https://patch.msgid.link/20240915183822.34588-8-qasim.majeed20@gmail.com [ rjw: Subject and changelog edits ] Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
This commit is contained in:
committed by
Rafael J. Wysocki
parent
c4ff125e37
commit
0dac2f74f3
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user