Skip to content

Commit 6c7bfb7

Browse files
qa-majeedrafaeljw
authored andcommitted
ACPI: acpi_processor: Use strscpy instead() of strcpy()
Replace strcpy() with strscpy() in the ACPI processor 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 4fe1135 commit 6c7bfb7

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/acpi/acpi_processor.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -436,8 +436,8 @@ static int acpi_processor_add(struct acpi_device *device,
436436
}
437437

438438
pr->handle = device->handle;
439-
strcpy(acpi_device_name(device), ACPI_PROCESSOR_DEVICE_NAME);
440-
strcpy(acpi_device_class(device), ACPI_PROCESSOR_CLASS);
439+
strscpy(acpi_device_name(device), ACPI_PROCESSOR_DEVICE_NAME);
440+
strscpy(acpi_device_class(device), ACPI_PROCESSOR_CLASS);
441441
device->driver_data = pr;
442442

443443
result = acpi_processor_get_info(device);

0 commit comments

Comments
 (0)