Commit bd25c378 authored by Helge Deller's avatar Helge Deller

parisc: Use safer strscpy() in setup_cmdline()

Signed-off-by: default avatarHelge Deller <deller@gmx.de>
parent 180d0eb2
...@@ -56,7 +56,7 @@ void __init setup_cmdline(char **cmdline_p) ...@@ -56,7 +56,7 @@ void __init setup_cmdline(char **cmdline_p)
/* called from hpux boot loader */ /* called from hpux boot loader */
boot_command_line[0] = '\0'; boot_command_line[0] = '\0';
} else { } else {
strlcpy(boot_command_line, (char *)__va(boot_args[1]), strscpy(boot_command_line, (char *)__va(boot_args[1]),
COMMAND_LINE_SIZE); COMMAND_LINE_SIZE);
#ifdef CONFIG_BLK_DEV_INITRD #ifdef CONFIG_BLK_DEV_INITRD
...@@ -68,7 +68,7 @@ void __init setup_cmdline(char **cmdline_p) ...@@ -68,7 +68,7 @@ void __init setup_cmdline(char **cmdline_p)
#endif #endif
} }
strcpy(command_line, boot_command_line); strscpy(command_line, boot_command_line, COMMAND_LINE_SIZE);
*cmdline_p = command_line; *cmdline_p = command_line;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment