Re: [PATCH linux-next] relay: use strscpy() is more robust and safer
From: Andrew Morton
Date: Mon Nov 21 2022 - 20:09:33 EST
On Tue, 22 Nov 2022 08:53:25 +0800 (CST) <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.
I really see no benefit to this switch in this situation. What am I
missing?
But I guess this:
hp2:/usr/src/linux-6.1-rc4> grep -r strlcpy . | wc
400 1913 34402
hp2:/usr/src/linux-6.1-rc4> grep -r strscpy . | wc
2824 11990 266471
is a good enough reason for applying.