projects
/
platform
/
kernel
/
linux-starfive.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6cdd75a
)
netfilter: nf_tables: refactor deprecated strncpy
author
Justin Stitt
<justinstitt@google.com>
Wed, 9 Aug 2023 01:06:06 +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_fib.c
patch
|
blob
|
history
diff --git
a/net/netfilter/nft_fib.c
b/net/netfilter/nft_fib.c
index
601c9e0
..
04b51f2
100644
(file)
--- a/
net/netfilter/nft_fib.c
+++ b/
net/netfilter/nft_fib.c
@@
-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
- str
ncpy
(reg, dev ? dev->name : "", IFNAMSIZ);
+ str
scpy_pad
(reg, dev ? dev->name : "", IFNAMSIZ);
break;
default:
WARN_ON_ONCE(1);