]> git.ipfire.org Git - thirdparty/linux.git/commit
m68k: mm: Replace deprecated strncpy() with strscpy()
authorThorsten Blum <thorsten.blum@linux.dev>
Thu, 13 Feb 2025 14:10:36 +0000 (15:10 +0100)
committerGreg Ungerer <gerg@kernel.org>
Sun, 16 Mar 2025 23:27:59 +0000 (09:27 +1000)
commita7130910b80753d52ff8a493cf787bd1c9473404
treefd6de203d831d7e8c8f9def816a51b6854933ffe
parent3d222ebf741be71cffed2e34cb437f0f751a7ca6
m68k: mm: Replace deprecated strncpy() with strscpy()

strncpy() is deprecated for NUL-terminated destination buffers. Use
strscpy() instead and remove the manual NUL-termination.

Compile-tested only.

Link: https://github.com/KSPP/linux/issues/90
Cc: linux-hardening@vger.kernel.org
Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev>
Tested-by: Jean-Michel Hautbois <jeanmichel.hautbois@yoseli.org>
Reviewed-by: Geert Uytterhoeven <geert@linux-m68k.org>
Reviewed-by: Kees Cook <kees@kernel.org>
Signed-off-by: Greg Ungerer <gerg@linux-m68k.org>
arch/m68k/kernel/setup_mm.c