Message ID | 20230822154336.12888-5-fw@strlen.de (mailing list archive) |
---|---|
State | Accepted |
Commit | 6cdd75a4a66b7c9b2a2667d87619816d6e744d0e |
Delegated to: | Netdev Maintainers |
Headers | show |
Series | [net-next,01/10] netfilter: ebtables: fix fortify warnings in size_entry_mwt() | expand |
diff --git a/net/netfilter/nft_ct.c b/net/netfilter/nft_ct.c index e87fd4314c68..86bb9d7797d9 100644 --- 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; - strncpy((char *)dest, helper->name, NF_CT_HELPER_NAME_LEN); + strscpy_pad((char *)dest, helper->name, NF_CT_HELPER_NAME_LEN); return; #ifdef CONFIG_NF_CONNTRACK_LABELS case NFT_CT_LABELS: {