Skip to content
Commit 99c31bff authored by Sunil V L's avatar Sunil V L Committed by Rafael J. Wysocki
Browse files

PNP: ACPI: Fix string truncation warning



LKP reports below warning when building for RISC-V.

drivers/pnp/pnpacpi/core.c:253:17:
warning: 'strncpy' specified bound 50 equals destination
size [-Wstringop-truncation]

This appears to be a valid issue since the destination string may not be
null-terminated.

To fix this, append the NUL explicitly after the strncpy().

Reported-by: default avatarkernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202307241942.Rff2Nri5-lkp@intel.com/
Signed-off-by: default avatarSunil V L <sunilvl@ventanamicro.com>
Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
parent 2ccdd1b1
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