Skip to content

Commit b32c9df

Browse files
qa-majeedrafaeljw
authored andcommitted
ACPI: AC: Use strscpy() instead of strcpy()
Replace strcpy() with strscpy() in the ACPI AC 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 5be63fc commit b32c9df

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/acpi/ac.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -213,8 +213,8 @@ static int acpi_ac_probe(struct platform_device *pdev)
213213
return -ENOMEM;
214214

215215
ac->device = adev;
216-
strcpy(acpi_device_name(adev), ACPI_AC_DEVICE_NAME);
217-
strcpy(acpi_device_class(adev), ACPI_AC_CLASS);
216+
strscpy(acpi_device_name(adev), ACPI_AC_DEVICE_NAME);
217+
strscpy(acpi_device_class(adev), ACPI_AC_CLASS);
218218

219219
platform_set_drvdata(pdev, ac);
220220

0 commit comments

Comments
 (0)