diff options
author | Justin Stitt <justinstitt@google.com> | 2023-08-09 01:06:06 +0000 |
---|---|---|
committer | Florian Westphal <fw@strlen.de> | 2023-08-22 15:13:21 +0200 |
commit | 7457af8bf9948aeb31de21e4be3bc1fef2730958 (patch) | |
tree | 2ce457068e9ef95c22b283f1f138d9ef314ec3ed /net/netfilter | |
parent | 6cdd75a4a66b7c9b2a2667d87619816d6e744d0e (diff) | |
download | linux-7457af8bf9948aeb31de21e4be3bc1fef2730958.tar.gz linux-7457af8bf9948aeb31de21e4be3bc1fef2730958.tar.bz2 linux-7457af8bf9948aeb31de21e4be3bc1fef2730958.zip |
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')
-rw-r--r-- | net/netfilter/nft_fib.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/netfilter/nft_fib.c b/net/netfilter/nft_fib.c index 601c9e09d07a..04b51f285332 100644 --- 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 - strncpy(reg, dev ? dev->name : "", IFNAMSIZ); + strscpy_pad(reg, dev ? dev->name : "", IFNAMSIZ); break; default: WARN_ON_ONCE(1); |