lkml.org 
[lkml]   [2022]   [Nov]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH linux-next] printk: use strscpy() to instead of strlcpy()
Date
On 2022-11-30, <yang.yang29@zte.com.cn> wrote:
> From: Xu Panda <xu.panda@zte.com.cn>
>
> 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@zte.com.cn>
> Signed-off-by: Yang Yang <yang.yang29@zte.com>

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

\
 
 \ /
  Last update: 2022-11-30 10:12    [W:0.036 / U:0.060 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site