Skip to content

Commit 1fd9f4c

Browse files
committed
Merge tag 'x86-boot-2022-06-05' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull x86 boot update from Thomas Gleixner: "Use strlcpy() instead of strscpy() in arch_setup()" * tag 'x86-boot-2022-06-05' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/setup: Use strscpy() to replace deprecated strlcpy()
2 parents c049ecc + 8a33d96 commit 1fd9f4c

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

arch/x86/kernel/setup.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -903,18 +903,18 @@ void __init setup_arch(char **cmdline_p)
903903

904904
#ifdef CONFIG_CMDLINE_BOOL
905905
#ifdef CONFIG_CMDLINE_OVERRIDE
906-
strlcpy(boot_command_line, builtin_cmdline, COMMAND_LINE_SIZE);
906+
strscpy(boot_command_line, builtin_cmdline, COMMAND_LINE_SIZE);
907907
#else
908908
if (builtin_cmdline[0]) {
909909
/* append boot loader cmdline to builtin */
910910
strlcat(builtin_cmdline, " ", COMMAND_LINE_SIZE);
911911
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);
913913
}
914914
#endif
915915
#endif
916916

917-
strlcpy(command_line, boot_command_line, COMMAND_LINE_SIZE);
917+
strscpy(command_line, boot_command_line, COMMAND_LINE_SIZE);
918918
*cmdline_p = command_line;
919919

920920
/*

0 commit comments

Comments
 (0)