Re: [PATCH -next] eeprom: at25: Replace strncpy() with strscpy()

From: Kees Cook
Date: Wed Jan 26 2022 - 15:00:20 EST


On Wed, Jan 26, 2022 at 02:48:39PM -0500, Ralph Siemsen wrote:
> Hi Kees,
>
> On Tue, Jan 18, 2022 at 10:20:47AM -0800, Kees Cook wrote:
> > Use strscpy() instead of strncpy(), since its use has been deprecated[1].
> >
> > [1] https://www.kernel.org/doc/html/latest/process/deprecated.html#strncpy-on-nul-terminated-strings
>
> Along with your other fix to restore the missing kzalloc(), I tested this
> change on 32-bit arm system, and it worked as expected.
>
> Tested-by: Ralph Siemsen <ralph.siemsen@xxxxxxxxxx>

Thanks!

--
Kees Cook