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
e53314034b
commit
6cdd75a4a6
@ -108,7 +108,7 @@ static void nft_ct_get_eval(const struct nft_expr *expr,
|
||||
helper = rcu_dereference(help->helper);
|
||||
if (helper == NULL)
|
||||
goto err;
|
||||
strncpy((char *)dest, helper->name, NF_CT_HELPER_NAME_LEN);
|
||||
strscpy_pad((char *)dest, helper->name, NF_CT_HELPER_NAME_LEN);
|
||||
return;
|
||||
#ifdef CONFIG_NF_CONNTRACK_LABELS
|
||||
case NFT_CT_LABELS: {
|
||||
|
Loading…
x
Reference in New Issue
Block a user