Re: [PATCH linux-next] printk: use strscpy() to instead of strlcpy()
From: John Ogness
Date: Wed Nov 30 2022 - 04:11:27 EST
On 2022-11-30, <yang.yang29@xxxxxxxxxx> wrote:
> From: Xu Panda <xu.panda@xxxxxxxxxx>
>
> The implementation of strscpy() is more robust and safer.
> That's now the recommended way to copy NUL terminated strings.
>
> Signed-off-by: Xu Panda <xu.panda@xxxxxxxxxx>
> Signed-off-by: Yang Yang <yang.yang29@xxxxxxx>
This looks fine, but I am wondering if we should also replace all
strncpy() usage as well. AFAICT they can all be replaced. It would also
avoid the manual termination in console_setup().
John Ogness