[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20250318201359.GC840@breakpoint.cc>
Date: Tue, 18 Mar 2025 21:13:59 +0100
From: Florian Westphal <fw@...len.de>
To: Thorsten Blum <thorsten.blum@...ux.dev>
Cc: Pablo Neira Ayuso <pablo@...filter.org>,
Jozsef Kadlecsik <kadlec@...filter.org>,
"David S. Miller" <davem@...emloft.net>,
Eric Dumazet <edumazet@...gle.com>,
Jakub Kicinski <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>,
Simon Horman <horms@...nel.org>, netfilter-devel@...r.kernel.org,
coreteam@...filter.org, netdev@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH net-next] netfilter: xtables: Use strscpy() instead of
strscpy_pad()
Thorsten Blum <thorsten.blum@...ux.dev> wrote:
> kzalloc() already zero-initializes the destination buffer, making
> strscpy() sufficient for safely copying the name. The additional NUL-
> padding performed by strscpy_pad() is unnecessary.
>
> The size parameter is optional, and strscpy() automatically determines
> the size of the destination buffer using sizeof() if the argument is
> omitted. This makes the explicit sizeof() call unnecessary; remove it.
>
> No functional changes intended.
>
> Signed-off-by: Thorsten Blum <thorsten.blum@...ux.dev>
Reviewed-by: Florian Westphal <fw@...len.de>
Powered by blists - more mailing lists