Re: [PATCH v2] atmel: replace deprecated strncpy with strscpy

2023-10-19 Thread Kees Cook
On Thu, Oct 19, 2023 at 05:29:01PM +, 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. > > We expect priv->firmware_id to be NUL-terminated based on its usage > wit

[PATCH v2] atmel: replace deprecated strncpy with strscpy

2023-10-19 Thread Justin Stitt
strncpy() is deprecated for use on NUL-terminated destination strings [1] and as such we should prefer more robust and less ambiguous string interfaces. We expect priv->firmware_id to be NUL-terminated based on its usage with seq_printf() and strlen() in atmel.c: 1420 | seq_printf(m, "%s loa