Re: [PATCH] module: Replace deprecated strncpy() with strscpy()

From: Petr Pavlu
Date: Mon Mar 10 2025 - 07:07:29 EST


On 3/7/25 12:35, Thorsten Blum wrote:
> strncpy() is deprecated for NUL-terminated destination buffers; use
> strscpy() instead. The destination buffer ownername is only used with
> "%s" format strings and must therefore be NUL-terminated, but not NUL-
> padded.
>
> No functional changes intended.
>
> Link: https://github.com/KSPP/linux/issues/90
> Cc: linux-hardening@xxxxxxxxxxxxxxx
> Signed-off-by: Thorsten Blum <thorsten.blum@xxxxxxxxx>

Looks good to me. I've queued it on modules-next.

--
Thanks,
Petr