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

authored by XueBing Chen and committed by Ingo Molnar 8a33d96b 6f3f04c1

+3 -3
+3 -3
arch/x86/kernel/setup.c
··· 903 903 904 904 #ifdef CONFIG_CMDLINE_BOOL 905 905 #ifdef CONFIG_CMDLINE_OVERRIDE 906 - strlcpy(boot_command_line, builtin_cmdline, COMMAND_LINE_SIZE); 906 + strscpy(boot_command_line, builtin_cmdline, COMMAND_LINE_SIZE); 907 907 #else 908 908 if (builtin_cmdline[0]) { 909 909 /* append boot loader cmdline to builtin */ 910 910 strlcat(builtin_cmdline, " ", COMMAND_LINE_SIZE); 911 911 strlcat(builtin_cmdline, boot_command_line, COMMAND_LINE_SIZE); 912 - strlcpy(boot_command_line, builtin_cmdline, COMMAND_LINE_SIZE); 912 + strscpy(boot_command_line, builtin_cmdline, COMMAND_LINE_SIZE); 913 913 } 914 914 #endif 915 915 #endif 916 916 917 - strlcpy(command_line, boot_command_line, COMMAND_LINE_SIZE); 917 + strscpy(command_line, boot_command_line, COMMAND_LINE_SIZE); 918 918 *cmdline_p = command_line; 919 919 920 920 /*