diff options
author | Wolfram Sang <wsa+renesas@sang-engineering.com> | 2022-08-18 23:02:24 +0200 |
---|---|---|
committer | Florian Westphal <fw@strlen.de> | 2022-09-07 16:46:03 +0200 |
commit | 8556bceb9c409946eebd2303d2f19e87844195ae (patch) | |
tree | fffbe2444da5c3c0c4003df303f4edab5597e3d0 /net/netfilter/nft_osf.c | |
parent | netfilter: remove NFPROTO_DECNET (diff) | |
download | linux-8556bceb9c409946eebd2303d2f19e87844195ae.tar.gz linux-8556bceb9c409946eebd2303d2f19e87844195ae.tar.bz2 linux-8556bceb9c409946eebd2303d2f19e87844195ae.zip |
netfilter: move from strlcpy with unused retval to strscpy
Follow the advice of the below link and prefer 'strscpy' in this
subsystem. Conversion is 1:1 because the return value is not used.
Generated by a coccinelle script.
Link: https://lore.kernel.org/r/CAHk-=wgfRnXz0W3D37d01q3JFkr_i_uTL=V6A6G1oUZcprmknw@mail.gmail.com/
Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Reviewed-by: Simon Horman <horms@verge.net.au>
Signed-off-by: Florian Westphal <fw@strlen.de>
Diffstat (limited to 'net/netfilter/nft_osf.c')
-rw-r--r-- | net/netfilter/nft_osf.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/netfilter/nft_osf.c b/net/netfilter/nft_osf.c index 89342ccccdcc..adacf95b6e2b 100644 --- a/net/netfilter/nft_osf.c +++ b/net/netfilter/nft_osf.c @@ -51,7 +51,7 @@ static void nft_osf_eval(const struct nft_expr *expr, struct nft_regs *regs, snprintf(os_match, NFT_OSF_MAXGENRELEN, "%s:%s", data.genre, data.version); else - strlcpy(os_match, data.genre, NFT_OSF_MAXGENRELEN); + strscpy(os_match, data.genre, NFT_OSF_MAXGENRELEN); strncpy((char *)dest, os_match, NFT_OSF_MAXGENRELEN); } |