]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
kdb: Replace deprecated strcpy() with memmove() in vkdb_printf()
authorThorsten Blum <thorsten.blum@linux.dev>
Tue, 19 Aug 2025 09:59:04 +0000 (11:59 +0200)
committerDaniel Thompson (RISCstar) <danielt@kernel.org>
Sat, 20 Sep 2025 18:56:28 +0000 (19:56 +0100)
commit8790cc2940bf9f5ec4d7458b0ea7f94a8acb094f
tree67047caad5b2b59852ff746216fccd468789ee2c
parentd4be3238d9e5f4841e5385cba3d81268c00d9e7d
kdb: Replace deprecated strcpy() with memmove() in vkdb_printf()

strcpy() is deprecated and its behavior is undefined when the source and
destination buffers overlap. Use memmove() instead to avoid any
undefined behavior.

Adjust comments for clarity.

Link: https://github.com/KSPP/linux/issues/88
Fixes: 5d5314d6795f ("kdb: core for kgdb back end (1 of 2)")
Reviewed-by: Douglas Anderson <dianders@chromium.org>
Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev>
Signed-off-by: Daniel Thompson (RISCstar) <danielt@kernel.org>
kernel/debug/kdb/kdb_io.c