diff options
author | Muhammad Qasim Abdul Majeed <[email protected]> | 2024-09-15 23:38:13 +0500 |
---|---|---|
committer | Rafael J. Wysocki <[email protected]> | 2024-11-05 21:35:35 +0100 |
commit | 0151814c4c60c8e789f4f764037a19bce0a5632a (patch) | |
tree | fd603547b435f4470b924dca30f89ca61cc1c350 | |
parent | 95504d54a2751ad3e995c7bbafc2116affb28ab9 (diff) |
ACPI: APD: Use strscpy() instead of strcpy()
Replace strcpy() with strscpy() in the ACPI APD 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 <[email protected]>
Link: https://patch.msgid.link/[email protected]
[ rjw: Subject and changelog edits ]
Signed-off-by: Rafael J. Wysocki <[email protected]>
-rw-r--r-- | drivers/acpi/acpi_apd.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/acpi/acpi_apd.c b/drivers/acpi/acpi_apd.c index 800f97868448..49539f7528c6 100644 --- a/drivers/acpi/acpi_apd.c +++ b/drivers/acpi/acpi_apd.c @@ -86,7 +86,7 @@ static int fch_misc_setup(struct apd_private_data *pdata) if (!clk_data->name) return -ENOMEM; - strcpy(clk_data->name, obj->string.pointer); + strscpy(clk_data->name, obj->string.pointer, obj->string.length); } else { /* Set default name to mclk if entry missing in firmware */ clk_data->name = "mclk"; |