projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e533140
)
netfilter: nf_tables: refactor deprecated strncpy
author
Justin Stitt
<justinstitt@google.com>
Wed, 9 Aug 2023 01:06:05 +0000
(
01:06
+0000)
committer
Florian Westphal
<fw@strlen.de>
Tue, 22 Aug 2023 13:13:21 +0000
(15:13 +0200)
Prefer `strscpy_pad` over `strncpy`.
Signed-off-by: Justin Stitt <justinstitt@google.com>
Signed-off-by: Florian Westphal <fw@strlen.de>
net/netfilter/nft_ct.c
patch
|
blob
|
history
diff --git
a/net/netfilter/nft_ct.c
b/net/netfilter/nft_ct.c
index e87fd4314c68626e1e90ceb98ae570c34c948a09..86bb9d7797d9eeaea730e463c389a958e0b6ec85 100644
(file)
--- 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;
- str
ncpy
((char *)dest, helper->name, NF_CT_HELPER_NAME_LEN);
+ str
scpy_pad
((char *)dest, helper->name, NF_CT_HELPER_NAME_LEN);
return;
#ifdef CONFIG_NF_CONNTRACK_LABELS
case NFT_CT_LABELS: {