diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2022-12-20 15:56:35 +0100 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2022-12-20 15:56:35 +0100 |
commit | b6bb9676f2165d518b35ba3bea5f1fcfc0d969bf (patch) | |
tree | 58f4fb795fed3f4b2c1cb6bbac9ed25b3134d390 /arch/m68k | |
parent | Merge tag 'spdx-6.2-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gre... (diff) | |
parent | m68k: use strscpy() to instead of strncpy() (diff) | |
download | linux-b6bb9676f2165d518b35ba3bea5f1fcfc0d969bf.tar.xz linux-b6bb9676f2165d518b35ba3bea5f1fcfc0d969bf.zip |
Merge tag 'm68knommu-for-v6.2' of git://git.kernel.org/pub/scm/linux/kernel/git/gerg/m68knommu
Pull m68knommu update from Greg Ungerer:
"Only a single change to use the safer strscpy() instead of strncpy()
when setting up the cmdline"
* tag 'm68knommu-for-v6.2' of git://git.kernel.org/pub/scm/linux/kernel/git/gerg/m68knommu:
m68k: use strscpy() to instead of strncpy()
Diffstat (limited to 'arch/m68k')
-rw-r--r-- | arch/m68k/kernel/setup_no.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/arch/m68k/kernel/setup_no.c b/arch/m68k/kernel/setup_no.c index cb6def585851..37fb663559b4 100644 --- a/arch/m68k/kernel/setup_no.c +++ b/arch/m68k/kernel/setup_no.c @@ -90,8 +90,7 @@ void __init setup_arch(char **cmdline_p) config_BSP(&command_line[0], sizeof(command_line)); #if defined(CONFIG_BOOTPARAM) - strncpy(&command_line[0], CONFIG_BOOTPARAM_STRING, sizeof(command_line)); - command_line[sizeof(command_line) - 1] = 0; + strscpy(&command_line[0], CONFIG_BOOTPARAM_STRING, sizeof(command_line)); #endif /* CONFIG_BOOTPARAM */ process_uboot_commandline(&command_line[0], sizeof(command_line)); |