Re: [PATCH] tools: gpio: replace strncpy with strscpy

From: Maxwell Doose

Date: Mon May 04 2026 - 17:00:59 EST


On Mon, May 4, 2026 at 3:54 PM Maxwell Doose <m32285159@xxxxxxxxx> wrote:
>
> Hi Lucas,
>
> On Mon, May 4, 2026 at 3:34 PM Lucas <lucasp.linux@xxxxxxxxx> wrote:
> >
> > Hi Max,
> >
> > Thank you for your review and your kind words!
> >
> > I will follow your recommendations and send a v2 shortly. I'll make sure
> > to update the function call to include the destination buffer size, and
> > I'll also correct the commit message and subject as you pointed out.
> >
> > I'll include your "Reviewed-by" tag in the new version.
> >
> > Best regards,
> > Lucas
> >
>
> Actually, timeout, I'm not sure if strscpy() is allowed in tools/. I'm
> going to double-check and I'll let you know if it is.
>
> best regards,
> max

Alright, just checked tools/include/linux/string.h, this can't be done
unfortunately. I like the idea though, perhaps you should submit a
patch adding strscpy there.

best regards,
max