mirror of
https://gitee.com/bianbu-linux/linux-6.6
synced 2025-04-24 14:07:52 -04:00
Merge branch 'pnp'
Merge a PNP change for 6.6-rc1: - Fix string truncation warning in pnpacpi_add_device() (Sunil V L). * pnp: PNP: ACPI: Fix string truncation warning
This commit is contained in:
commit
b483d3b8a5
1 changed files with 3 additions and 0 deletions
|
@ -254,6 +254,9 @@ static int __init pnpacpi_add_device(struct acpi_device *device)
|
|||
else
|
||||
strncpy(dev->name, acpi_device_bid(device), sizeof(dev->name));
|
||||
|
||||
/* Handle possible string truncation */
|
||||
dev->name[sizeof(dev->name) - 1] = '\0';
|
||||
|
||||
if (dev->active)
|
||||
pnpacpi_parse_allocated_resource(dev);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue