[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <Y4cz27AbZVVd9pLJ@alley>
Date: Wed, 30 Nov 2022 11:43:39 +0100
From: Petr Mladek <pmladek@...e.com>
To: John Ogness <john.ogness@...utronix.de>
Cc: yang.yang29@....com.cn, senozhatsky@...omium.org,
rostedt@...dmis.org, linux-kernel@...r.kernel.org,
xu.panda@....com.cn
Subject: Re: [PATCH linux-next] printk: use strscpy() to instead of strlcpy()
On Wed 2022-11-30 10:17:07, John Ogness wrote:
> On 2022-11-30, <yang.yang29@....com.cn> wrote:
> > From: Xu Panda <xu.panda@....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@....com.cn>
> > Signed-off-by: Yang Yang <yang.yang29@....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().
I agree that it would be nice to replace strncpy() as well.
But it might be done in a separate patch.
Yang, Xu, would you like to do it, please?
Best Regards,
Petr
Powered by blists - more mailing lists