Re: [PATCH v2] net: dsa: lan9303: use ethtool_sprintf() for lan9303_get_strings()

From: Kees Cook
Date: Thu Nov 30 2023 - 17:00:07 EST


On Thu, 05 Oct 2023 18:56:50 +0000, Justin Stitt wrote:
> This pattern of strncpy with some pointer arithmetic setting fixed-sized
> intervals with string literal data is a bit weird so let's use
> ethtool_sprintf() as this has more obvious behavior and is less-error
> prone.
>
> Nicely, we also get to drop a usage of the now deprecated strncpy() [1].
>
> [...]

Applied to for-next/hardening, thanks!

[1/1] net: dsa: lan9303: use ethtool_sprintf() for lan9303_get_strings()
https://git.kernel.org/kees/c/f1c7720549bf

Take care,

--
Kees Cook