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

strcpy() is deprecated; use memcpy() instead.

We can safely use memcpy() because we already know the length of the
source string 'cp' and that it is guaranteed to be NUL-terminated within
the first KDB_GREP_STRLEN bytes.

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