mirror of
https://github.com/torvalds/linux.git
synced 2024-11-22 03:59:00 +00:00
ACPI: event: Use strscpy() instead of strcpy()
Replace strcpy() with strscpy() in the ACPI event 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-3-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
f098bb555f
commit
e7eb88e383
@ -28,8 +28,8 @@ int acpi_notifier_call_chain(struct acpi_device *dev, u32 type, u32 data)
|
||||
{
|
||||
struct acpi_bus_event event;
|
||||
|
||||
strcpy(event.device_class, dev->pnp.device_class);
|
||||
strcpy(event.bus_id, dev->pnp.bus_id);
|
||||
strscpy(event.device_class, dev->pnp.device_class);
|
||||
strscpy(event.bus_id, dev->pnp.bus_id);
|
||||
event.type = type;
|
||||
event.data = data;
|
||||
return (blocking_notifier_call_chain(&acpi_chain_head, 0, (void *)&event)
|
||||
|
Loading…
Reference in New Issue
Block a user