We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 56db6a8 + 99c31bf commit b483d3bCopy full SHA for b483d3b
1 file changed
drivers/pnp/pnpacpi/core.c
@@ -254,6 +254,9 @@ static int __init pnpacpi_add_device(struct acpi_device *device)
254
else
255
strncpy(dev->name, acpi_device_bid(device), sizeof(dev->name));
256
257
+ /* Handle possible string truncation */
258
+ dev->name[sizeof(dev->name) - 1] = '\0';
259
+
260
if (dev->active)
261
pnpacpi_parse_allocated_resource(dev);
262
0 commit comments