]> git.baikalelectronics.ru Git - kernel.git/commit
x86/setup: Use strscpy() to replace deprecated strlcpy()
authorXueBing Chen <chenxuebing@jari.cn>
Wed, 25 May 2022 08:51:01 +0000 (16:51 +0800)
committerIngo Molnar <mingo@kernel.org>
Wed, 25 May 2022 13:34:38 +0000 (15:34 +0200)
commit165887919ef372f199d91a9e9476348e400089a6
treef804780a2479aa71d4c7802ce7ff1d6d485523bb
parent5dbf1e858a581dbe2a620155b24ad399ad8b8b9d
x86/setup: Use strscpy() to replace deprecated strlcpy()

strlcpy() is marked deprecated and should not be used, because
it doesn't limit the source length.

The preferred interface for when strlcpy()'s return value is not
checked (truncation) is strscpy().

[ mingo: Tweaked the changelog ]

Signed-off-by: XueBing Chen <chenxuebing@jari.cn>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Link: https://lore.kernel.org/r/730f0fef.a33.180fa69880f.Coremail.chenxuebing@jari.cn
arch/x86/kernel/setup.c