]> git.baikalelectronics.ru Git - kernel.git/commit
ACPI: event: replace strcpy() by strscpy()
authorGustavo A. R. Silva <gustavo@embeddedor.com>
Mon, 22 Apr 2019 16:39:34 +0000 (11:39 -0500)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Tue, 23 Apr 2019 08:54:26 +0000 (10:54 +0200)
commita6fff985305bdcdf10a3aa5bdeb8ba9827e81703
tree8dc935aedba3111a6eab4113dbeee21060cd2d22
parent4dd7c0e95664254d04e83f554ae5c083472a849f
ACPI: event: replace strcpy() by strscpy()

The strcpy() function is being deprecated. Replace it by the safer
strscpy() and fix the following Coverity warnings:

"You might overrun the 15-character fixed-size string event->bus_id
by copying bus_id without checking the length."

"You might overrun the 20-character fixed-size string event->device_class
by copying device_class without checking the length."

Addresses-Coverity-ID: 139001 ("Copy into fixed size buffer")
Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
drivers/acpi/event.c