summaryrefslogtreecommitdiffstats
path: root/arch/parisc
diff options
context:
space:
mode:
authorHelge Deller <deller@gmx.de>2022-01-14 07:52:07 +0100
committerHelge Deller <deller@gmx.de>2022-01-20 20:39:19 +0100
commitbd25c378527f3fde38a496ac2744cbd3924f0803 (patch)
treea815b20c6b1183fe21cd0921b261030e5104bcf4 /arch/parisc
parent180d0eb290a5d11e6d3d99fea0841ceae2893901 (diff)
downloadlinux-bd25c378527f3fde38a496ac2744cbd3924f0803.tar.bz2
parisc: Use safer strscpy() in setup_cmdline()
Signed-off-by: Helge Deller <deller@gmx.de>
Diffstat (limited to 'arch/parisc')
-rw-r--r--arch/parisc/kernel/setup.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/parisc/kernel/setup.c b/arch/parisc/kernel/setup.c
index cceb09855e03..456087a2350c 100644
--- a/arch/parisc/kernel/setup.c
+++ b/arch/parisc/kernel/setup.c
@@ -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;
}