Re: [PATCH v2] binfmt: replace deprecated strncpy

2024-03-21 Thread Kees Cook
On Thu, 21 Mar 2024 20:04:08 +, 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. > > There is a _nearly_ identical implementation of fill_psinfo present in > binfmt

[PATCH v2] binfmt: replace deprecated strncpy

2024-03-21 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. There is a _nearly_ identical implementation of fill_psinfo present in binfmt_elf.c -- except that one uses get_task_comm over strncpy(). Let's m