diff options
author | Justin Stitt <justinstitt@google.com> | 2023-08-09 04:06:05 +0300 |
---|---|---|
committer | Florian Westphal <fw@strlen.de> | 2023-08-22 16:13:21 +0300 |
commit | 6cdd75a4a66b7c9b2a2667d87619816d6e744d0e (patch) | |
tree | dcde79047a7d5b40eb79f71a9cbf5d8721cc1ea2 /net/netfilter/nft_ct.c | |
parent | e53314034b2374cfe9a426a5edab51e30cfe8f02 (diff) | |
download | linux-6cdd75a4a66b7c9b2a2667d87619816d6e744d0e.tar.xz |
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>
Diffstat (limited to 'net/netfilter/nft_ct.c')
-rw-r--r-- | net/netfilter/nft_ct.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/netfilter/nft_ct.c b/net/netfilter/nft_ct.c index e87fd4314c68..86bb9d7797d9 100644 --- a/net/netfilter/nft_ct.c +++ b/net/netfilter/nft_ct.c @@ -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: { |