Re: [PATCH v2 1/7] netfilter: ipset: refactor deprecated strncpy

From: Justin Stitt
Date: Wed Aug 09 2023 - 18:47:20 EST


On Wed, Aug 9, 2023 at 2:58 PM Florian Westphal <fw@xxxxxxxxx> wrote:
>
> Justin Stitt <justinstitt@xxxxxxxxxx> wrote:
> > On Wed, Aug 9, 2023 at 1:19 PM Florian Westphal <fw@xxxxxxxxx> wrote:
> > >
> > > Justin Stitt <justinstitt@xxxxxxxxxx> wrote:
> > > > Use `strscpy_pad` instead of `strncpy`.
> > >
> > > I don't think that any of these need zero-padding.
> > It's a more consistent change with the rest of the series and I don't
> > believe it has much different behavior to `strncpy` (other than
> > NUL-termination) as that will continue to pad to `n` as well.
> >
> > Do you think the `_pad` for 1/7, 6/7 and 7/7 should be changed back to
> > `strscpy` in a v3? I really am shooting in the dark as it is quite
> > hard to tell whether or not a buffer is expected to be NUL-padded or
> > not.
>
> No, you can keep it as-is. Which tree are you targetting with this?
Not sure, I let ./getmaintainer auto-add the mailing lists. Perhaps
netdev or netfilter next trees?