Skip to content

Commit

Permalink
parisc: Use safer strscpy() in setup_cmdline()
Browse files Browse the repository at this point in the history
Signed-off-by: Helge Deller <deller@gmx.de>
  • Loading branch information
Helge Deller committed Jan 20, 2022
1 parent 180d0eb commit bd25c37
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions arch/parisc/kernel/setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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;
}

Expand Down

0 comments on commit bd25c37

Please sign in to comment.