mirror of
https://github.com/torvalds/linux.git
synced 2026-10-07 22:37:45 -04:00
GCC8 started emitting warning about using strncpy with number of bytes exactly equal destination size which could lead to non-zero terminated string being copied. Use "SYSFS_PATH_MAX - 1" & "SYSFS_BUS_ID_SIZE - 1" as number of bytes to ensure name is always zero-terminated. Signed-off-by: Changcheng Liu <[email protected]> Acked-by: Shuah Khan <[email protected]> Link: https://lore.kernel.org/r/20190725132209.GA27590@jerryopenix Signed-off-by: Greg Kroah-Hartman <[email protected]>