x86/mce/dev-mcelog: use strscpy() to instead of strncpy()
authorXu Panda <xu.panda@zte.com.cn>
Sat, 3 Dec 2022 06:19:32 +0000 (14:19 +0800)
committerIngo Molnar <mingo@kernel.org>
Sat, 7 Jan 2023 10:47:35 +0000 (11:47 +0100)
commit7ddf0050a21fdcc025c3cb1055fe3db60df1cd97
tree95a2b11a179a19cadef75c8d389aa9cbde43a728
parentbd4edba2653aeef0119b7a945f07e58711343bf9
x86/mce/dev-mcelog: use strscpy() to instead of strncpy()

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>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Reviewed-by: Tony Luck <tony.luck@intel.com>
Link: https://lore.kernel.org/r/202212031419324523731@zte.com.cn
arch/x86/kernel/cpu/mce/dev-mcelog.c