parisc: Use safer strscpy() in setup_cmdline()

Signed-off-by: Helge Deller <deller@gmx.de>
This commit is contained in:
Helge Deller 2022-01-14 07:52:07 +01:00
parent 180d0eb290
commit bd25c37852
1 changed files with 2 additions and 2 deletions

View File

@ -56,7 +56,7 @@ void __init setup_cmdline(char **cmdline_p)
/* called from hpux boot loader */
boot_command_line[0] = '\0';
} else {
strlcpy(boot_command_line, (char *)__va(boot_args[1]),
strscpy(boot_command_line, (char *)__va(boot_args[1]),
COMMAND_LINE_SIZE);
#ifdef CONFIG_BLK_DEV_INITRD
@ -68,7 +68,7 @@ void __init setup_cmdline(char **cmdline_p)
#endif
}
strcpy(command_line, boot_command_line);
strscpy(command_line, boot_command_line, COMMAND_LINE_SIZE);
*cmdline_p = command_line;
}