]> www.infradead.org Git - users/jedix/linux-maple.git/commit
m68k/kernel: replace strncpy() with strscpy()
authorMohammad Mahdi Anbaraki <m.mahdianbaraki@gmail.com>
Thu, 3 Apr 2025 18:11:59 +0000 (21:41 +0330)
committerGreg Ungerer <gerg@kernel.org>
Sun, 18 May 2025 22:54:30 +0000 (08:54 +1000)
commit245bb7b95aff5f20884c0b635eacb96645eadc84
tree55051d697e0070b883d6c55d55bb3e35f466f689
parent0c4aba403f4f294c15e2bbc8e1164aa68bc233bd
m68k/kernel: replace strncpy() with strscpy()

Swapped out strncpy() for strscpy() in parse_uboot_commandline() while
copying to commandp. strscpy() makes sure the string is properly null-
terminated and gives a more useful return value so it's just a safer
choice overall.

Link: https://github.com/KSPP/linux/issues/90
Signed-off-by: Mohammad Mahdi Anbaraki <m.mahdianbaraki@gmail.com>
Signed-off-by: Greg Ungerer <gerg@linux-m68k.org>
arch/m68k/kernel/uboot.c