mirror of
https://github.com/torvalds/linux.git
synced 2024-11-21 19:46:16 +00:00
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 <qasim.majeed20@gmail.com> Link: https://patch.msgid.link/20240915183822.34588-1-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:
parent
95504d54a2
commit
0151814c4c
@ -86,7 +86,7 @@ static int fch_misc_setup(struct apd_private_data *pdata)
|
|||||||
if (!clk_data->name)
|
if (!clk_data->name)
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
|
|
||||||
strcpy(clk_data->name, obj->string.pointer);
|
strscpy(clk_data->name, obj->string.pointer, obj->string.length);
|
||||||
} else {
|
} else {
|
||||||
/* Set default name to mclk if entry missing in firmware */
|
/* Set default name to mclk if entry missing in firmware */
|
||||||
clk_data->name = "mclk";
|
clk_data->name = "mclk";
|
||||||
|
Loading…
Reference in New Issue
Block a user