diff options
author | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2023-08-25 21:57:06 +0300 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2023-08-25 21:57:06 +0300 |
commit | b483d3b8a54a544ab8854ca6dbb8d99c423b3ba4 (patch) | |
tree | 83f0a5234da6435fc0669468e70472d36caec543 | |
parent | 56db6a8e5a5942930b6e788e555e58f0f68edbd5 (diff) | |
parent | 99c31bff185610304532c4acf00cda341572e2d4 (diff) | |
download | linux-b483d3b8a54a544ab8854ca6dbb8d99c423b3ba4.tar.xz |
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
-rw-r--r-- | drivers/pnp/pnpacpi/core.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/pnp/pnpacpi/core.c b/drivers/pnp/pnpacpi/core.c index 38928ff7472b..6ab272c84b7b 100644 --- a/drivers/pnp/pnpacpi/core.c +++ b/drivers/pnp/pnpacpi/core.c @@ -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); |