Re: [PATCH v2 2/2] tools: include: add proper strscpy() declaration

From: Maxwell Doose

Date: Mon May 04 2026 - 17:39:46 EST


On Mon, May 4, 2026 at 4:34 PM Lucas Poupeau <lucasp.linux@xxxxxxxxx> wrote:
>
> Currently, strscpy() is defined as a macro for strcpy() in the tools
> headers. This is unsafe and prevents using the real strscpy() logic
> that provides better buffer overflow protection.
>
> Remove the macro hack and add a proper extern declaration for
> strscpy(). This allows tools to use the safer string copying API
> once the implementation is provided.
>
> Suggested-by: Maxwell Doose <m32285159@xxxxxxxxx>
> Signed-off-by: Lucas Poupeau <lucasp.linux@xxxxxxxxx>
> ---
> tools/include/linux/string.h | 5 ++++-
> tools/lib/string.c | 37 ++++++++++++++++++++++++++++++++++++
> 2 files changed, 41 insertions(+), 1 deletion(-)
>
[snip]

Didn't you already submit this? Doesn't look like anything changed if
this is a v2.

best regards,
max