linux/drivers/net/hamradio
Andrew Lunn e03d8a377f 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>
2020-11-02 16:10:24 -08:00
..
6pack.c 6pack,mkiss: fix possible deadlock 2019-12-13 21:49:29 -08:00
Kconfig docs: networking: move baycom to the hw driver section 2020-06-26 16:08:44 -07:00
Makefile License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
baycom_epp.c treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
baycom_par.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 69 2019-05-24 17:36:47 +02:00
baycom_ser_fdx.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 69 2019-05-24 17:36:47 +02:00
baycom_ser_hdx.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 69 2019-05-24 17:36:47 +02:00
bpqether.c net: change addr_list_lock back to static key 2020-06-09 12:59:45 -07:00
dmascc.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 61 2019-05-24 17:36:45 +02:00
hdlcdrv.c net: driver: hamradio: Fix potential unterminated string 2020-11-02 16:10:24 -08:00
mkiss.c treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
scc.c drivers: net: hamradio: fix document location 2020-10-15 07:49:47 +02:00
yam.c yam: fix possible memory leak in yam_init_driver 2020-06-04 15:58:41 -07:00
z8530.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00