Skip to content
Commit 6389a62f authored by Liu, Changcheng's avatar Liu, Changcheng Committed by Greg Kroah-Hartman
Browse files

usbip: tools: fix GCC8 warning for strncpy



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: default avatarChangcheng Liu <changcheng.liu@aliyun.com>
Acked-by: default avatarShuah Khan <skhan@linuxfoundation.org>
Link: https://lore.kernel.org/r/20190725132209.GA27590@jerryopenix


Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 34d05459
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