Skip to content

Commit b6bb967

Browse files
committed
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()
2 parents 32d528c + af5d74e commit b6bb967

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

arch/m68k/kernel/setup_no.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,8 +90,7 @@ void __init setup_arch(char **cmdline_p)
9090
config_BSP(&command_line[0], sizeof(command_line));
9191

9292
#if defined(CONFIG_BOOTPARAM)
93-
strncpy(&command_line[0], CONFIG_BOOTPARAM_STRING, sizeof(command_line));
94-
command_line[sizeof(command_line) - 1] = 0;
93+
strscpy(&command_line[0], CONFIG_BOOTPARAM_STRING, sizeof(command_line));
9594
#endif /* CONFIG_BOOTPARAM */
9695

9796
process_uboot_commandline(&command_line[0], sizeof(command_line));

0 commit comments

Comments
 (0)