Re: [PATCH] net: ena: replace deprecated strncpy with strscpy

From: Kees Cook
Date: Thu Nov 30 2023 - 16:59:59 EST


On Thu, 05 Oct 2023 00:56:08 +0000, Justin Stitt wrote:
> `strncpy` is deprecated for use on NUL-terminated destination strings
> [1] and as such we should prefer more robust and less ambiguous string
> interfaces.
>
> NUL-padding is not necessary as host_info is initialized to
> `ena_dev->host_attr.host_info` which is ultimately zero-initialized via
> alloc_etherdev_mq().
>
> [...]

Applied to for-next/hardening, thanks!

[1/1] net: ena: replace deprecated strncpy with strscpy
https://git.kernel.org/kees/c/111f5a435d33

Take care,

--
Kees Cook