linux-stable/drivers/net/bonding
Kees Cook 43902070fb net: bonding: Use strscpy_pad() instead of manually-truncated strncpy()
Silence this warning by using strscpy_pad() directly:

drivers/net/bonding/bond_main.c:4877:3: warning: 'strncpy' specified bound 16 equals destination size [-Wstringop-truncation]
    4877 |   strncpy(params->primary, primary, IFNAMSIZ);
         |   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Additionally replace other strncpy() uses, as it is considered deprecated:
https://www.kernel.org/doc/html/latest/process/deprecated.html#strncpy-on-nul-terminated-strings

Reported-by: kernel test robot <lkp@intel.com>
Link: https://lore.kernel.org/lkml/202102150705.fdR6obB0-lkp@intel.com
Acked-by: Jay Vosburgh <jay.vosburgh@canonical.com>
Signed-off-by: Kees Cook <keescook@chromium.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2021-06-03 14:16:14 -07:00
..
bond_3ad.c bonding: 3ad: Print an error for unknown speeds 2021-02-11 14:28:21 -08:00
bond_alb.c net: bonding: bond_alb: Fix some typos in bond_alb.c 2021-05-21 13:30:41 -07:00
bond_debugfs.c net: bonding: remove unnecessary braces 2021-05-20 15:43:24 -07:00
bond_main.c net: bonding: Use strscpy_pad() instead of manually-truncated strncpy() 2021-06-03 14:16:14 -07:00
bond_netlink.c net: bonding: use tabs instead of space for code indent 2021-05-20 15:43:24 -07:00
bond_options.c net: bonding: Use strscpy_pad() instead of manually-truncated strncpy() 2021-06-03 14:16:14 -07:00
bond_procfs.c net: bonding: add some required blank lines 2021-05-20 15:43:24 -07:00
bond_sysfs.c net: bonding: add some required blank lines 2021-05-20 15:43:24 -07:00
bond_sysfs_slave.c bonding: wait for sysfs kobject destruction before freeing struct slave 2020-11-21 13:07:00 -08:00
bonding_priv.h drivers: Remove inclusion of vermagic header 2020-04-21 13:27:37 -07:00
Makefile treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00