Skip to content

Commit bd25c37

Browse files
committed
parisc: Use safer strscpy() in setup_cmdline()
Signed-off-by: Helge Deller <deller@gmx.de>
1 parent 180d0eb commit bd25c37

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

arch/parisc/kernel/setup.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ void __init setup_cmdline(char **cmdline_p)
5656
/* called from hpux boot loader */
5757
boot_command_line[0] = '\0';
5858
} else {
59-
strlcpy(boot_command_line, (char *)__va(boot_args[1]),
59+
strscpy(boot_command_line, (char *)__va(boot_args[1]),
6060
COMMAND_LINE_SIZE);
6161

6262
#ifdef CONFIG_BLK_DEV_INITRD
@@ -68,7 +68,7 @@ void __init setup_cmdline(char **cmdline_p)
6868
#endif
6969
}
7070

71-
strcpy(command_line, boot_command_line);
71+
strscpy(command_line, boot_command_line, COMMAND_LINE_SIZE);
7272
*cmdline_p = command_line;
7373
}
7474

0 commit comments

Comments
 (0)