]> git.ipfire.org Git - thirdparty/linux.git/commit
kdb: Replace deprecated strcpy() with helper function in kdb_defcmd()
authorThorsten Blum <thorsten.blum@linux.dev>
Tue, 19 Aug 2025 09:59:06 +0000 (11:59 +0200)
committerDaniel Thompson (RISCstar) <danielt@kernel.org>
Sat, 20 Sep 2025 18:56:28 +0000 (19:56 +0100)
commit0c28a23722e03695ae1cbbadde3dd32d75c1cb7f
treece3da24286cb9633d00bb0e7ea6b62c155c9b05e
parent5b26f1a3146454a24dbcb8b1cdae5d507f7432e6
kdb: Replace deprecated strcpy() with helper function in kdb_defcmd()

strcpy() is deprecated; use the new helper function kdb_strdup_dequote()
instead. In addition to string duplication similar to kdb_strdup(), it
also trims surrounding quotes from the input string if present.

kdb_strdup_dequote() also checks for a trailing quote in the input
string which was previously not checked.

Link: https://github.com/KSPP/linux/issues/88
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_main.c
kernel/debug/kdb/kdb_private.h
kernel/debug/kdb/kdb_support.c