Skip to content

Commit 4fe1135

Browse files
qa-majeedrafaeljw
authored andcommitted
ACPI: PAD: Use strscpy() instead of strcpy()
Replace strcpy() with strscpy() in the ACPI processor aggregator (PAD) driver. strcpy() has been deprecated because it is generally unsafe, so help to eliminate it from the kernel source. Link: KSPP#88 Signed-off-by: Muhammad Qasim Abdul Majeed <[email protected]> Link: https://patch.msgid.link/[email protected] [ rjw: Subject and changelog edits ] Signed-off-by: Rafael J. Wysocki <[email protected]>
1 parent b32c9df commit 4fe1135

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/acpi/acpi_pad.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -428,8 +428,8 @@ static int acpi_pad_probe(struct platform_device *pdev)
428428
struct acpi_device *adev = ACPI_COMPANION(&pdev->dev);
429429
acpi_status status;
430430

431-
strcpy(acpi_device_name(adev), ACPI_PROCESSOR_AGGREGATOR_DEVICE_NAME);
432-
strcpy(acpi_device_class(adev), ACPI_PROCESSOR_AGGREGATOR_CLASS);
431+
strscpy(acpi_device_name(adev), ACPI_PROCESSOR_AGGREGATOR_DEVICE_NAME);
432+
strscpy(acpi_device_class(adev), ACPI_PROCESSOR_AGGREGATOR_CLASS);
433433

434434
status = acpi_install_notify_handler(adev->handle,
435435
ACPI_DEVICE_NOTIFY, acpi_pad_notify, adev);

0 commit comments

Comments
 (0)