On Sat, 31 Oct 2020 19:17:00 +0100 Andrew Lunn wrote:
> 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 <and...@lunn.ch>

Looks like the longest name in tree is 14, so there should be no
truncation and therefore uAPI change.

Applied, thanks!

Reply via email to