aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/hamradio/baycom_epp.c
diff options
context:
space:
mode:
authorAndrew Lunn <andrew@lunn.ch>2020-10-31 19:17:00 +0100
committerJakub Kicinski <kuba@kernel.org>2020-11-02 16:10:24 -0800
commite03d8a377fcc94f7c92fbd9dcdefe7d998a053e6 (patch)
tree5d5526b6e13645de8f4de05982d804dd48975ff8 /drivers/net/hamradio/baycom_epp.c
parentdrivers: net: wan: lmc: Fix W=1 set but used variable warnings (diff)
downloadlinux-dev-e03d8a377fcc94f7c92fbd9dcdefe7d998a053e6.tar.xz
linux-dev-e03d8a377fcc94f7c92fbd9dcdefe7d998a053e6.zip
net: driver: hamradio: Fix potential unterminated string
With W=1 the following error is reported: In function ‘strncpy’, inlined from ‘hdlcdrv_ioctl’ at drivers/net/hamradio/hdlcdrv.c:600:4: ./include/linux/string.h:297:30: warning: ‘__builtin_strncpy’ specified bound 32 equals destination size [-Wstringop-truncation] 297 | #define __underlying_strncpy __builtin_strncpy | ^ ./include/linux/string.h:307:9: note: in expansion of macro ‘__underlying_strncpy’ 307 | return __underlying_strncpy(p, q, size); Replace strncpy with strlcpy to guarantee the string is terminated. Signed-off-by: Andrew Lunn <andrew@lunn.ch> Link: https://lore.kernel.org/r/20201031181700.1081693-1-andrew@lunn.ch Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'drivers/net/hamradio/baycom_epp.c')
0 files changed, 0 insertions, 0 deletions