Commit 6cdd75a4 authored by Justin Stitt's avatar Justin Stitt Committed by Florian Westphal

netfilter: nf_tables: refactor deprecated strncpy

Prefer `strscpy_pad` over `strncpy`.
Signed-off-by: default avatarJustin Stitt <justinstitt@google.com>
Signed-off-by: default avatarFlorian Westphal <fw@strlen.de>
parent e5331403
...@@ -108,7 +108,7 @@ static void nft_ct_get_eval(const struct nft_expr *expr, ...@@ -108,7 +108,7 @@ static void nft_ct_get_eval(const struct nft_expr *expr,
helper = rcu_dereference(help->helper); helper = rcu_dereference(help->helper);
if (helper == NULL) if (helper == NULL)
goto err; goto err;
strncpy((char *)dest, helper->name, NF_CT_HELPER_NAME_LEN); strscpy_pad((char *)dest, helper->name, NF_CT_HELPER_NAME_LEN);
return; return;
#ifdef CONFIG_NF_CONNTRACK_LABELS #ifdef CONFIG_NF_CONNTRACK_LABELS
case NFT_CT_LABELS: { case NFT_CT_LABELS: {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment