OSDN Git Service

netfilter: nft_osf: refactor deprecated strncpy
authorJustin Stitt <justinstitt@google.com>
Wed, 9 Aug 2023 01:06:08 +0000 (01:06 +0000)
committerFlorian Westphal <fw@strlen.de>
Tue, 22 Aug 2023 13:13:21 +0000 (15:13 +0200)
commit6d87a4eae89e2ae015b40fd0adc90e9a7dc9fccb
tree31ca7d387e03689d4f503fc52d585540f465427e
parent7457af8bf9948aeb31de21e4be3bc1fef2730958
netfilter: nft_osf: refactor deprecated strncpy

Use `strscpy_pad` over `strncpy` for NUL-terminated strings.

We can also drop the + 1 from `NFT_OSF_MAXGENRELEN + 1` since `strscpy`
will guarantee NUL-termination.

Signed-off-by: Justin Stitt <justinstitt@google.com>
Signed-off-by: Florian Westphal <fw@strlen.de>
net/netfilter/nft_osf.c