netfilter: nf_tables: refactor deprecated strncpy
Prefer `strscpy_pad` over `strncpy`. Signed-off-by: Justin Stitt <justinstitt@google.com> Signed-off-by: Florian Westphal <fw@strlen.de>
This commit is contained in:
parent
6cdd75a4a6
commit
7457af8bf9
|
@ -151,7 +151,7 @@ void nft_fib_store_result(void *reg, const struct nft_fib *priv,
|
|||
if (priv->flags & NFTA_FIB_F_PRESENT)
|
||||
*dreg = !!dev;
|
||||
else
|
||||
strncpy(reg, dev ? dev->name : "", IFNAMSIZ);
|
||||
strscpy_pad(reg, dev ? dev->name : "", IFNAMSIZ);
|
||||
break;
|
||||
default:
|
||||
WARN_ON_ONCE(1);
|
||||
|
|
Loading…
Reference in New Issue