Commit cfc38d43 authored by Muhammad Qasim Abdul Majeed's avatar Muhammad Qasim Abdul Majeed Committed by Rafael J. Wysocki

ACPI: video: Use strscpy() instead of strcpy()

Replace strcpy() with strscpy() in the ACPI backlight code.

strcpy() has been deprecated because it is generally unsafe, so help to
eliminate if from the kernel source.

Link: https://github.com/KSPP/linux/issues/88Signed-off-by: default avatarMuhammad Qasim Abdul Majeed <qasim.majeed20@gmail.com>
Link: https://patch.msgid.link/20240703084124.11530-1-qasim.majeed20@gmail.com
[ rjw: Subject and changelog edits ]
Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
parent 22a40d14
......@@ -1128,8 +1128,8 @@ static int acpi_video_bus_get_one_device(struct acpi_device *device, void *arg)
return -ENOMEM;
}
strcpy(acpi_device_name(device), ACPI_VIDEO_DEVICE_NAME);
strcpy(acpi_device_class(device), ACPI_VIDEO_CLASS);
strscpy(acpi_device_name(device), ACPI_VIDEO_DEVICE_NAME);
strscpy(acpi_device_class(device), ACPI_VIDEO_CLASS);
data->device_id = device_id;
data->video = video;
......@@ -2010,8 +2010,8 @@ static int acpi_video_bus_add(struct acpi_device *device)
}
video->device = device;
strcpy(acpi_device_name(device), ACPI_VIDEO_BUS_NAME);
strcpy(acpi_device_class(device), ACPI_VIDEO_CLASS);
strscpy(acpi_device_name(device), ACPI_VIDEO_BUS_NAME);
strscpy(acpi_device_class(device), ACPI_VIDEO_CLASS);
device->driver_data = video;
acpi_video_bus_find_cap(video);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment