From: Thorsten Blum <thorsten.blum@linux.dev>
To: Doug Anderson <dianders@chromium.org>
Cc: Jason Wessel <jason.wessel@windriver.com>,
Daniel Thompson <danielt@kernel.org>,
Nir Lichtman <nir@lichtman.org>,
Yuran Pereira <yuran.pereira@hotmail.com>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Zhang Heng <zhangheng@kylinos.cn>,
"Dr. David Alan Gilbert" <linux@treblig.org>,
linux-hardening@vger.kernel.org,
Daniel Thompson <daniel@riscstar.com>,
kgdb-bugreport@lists.sourceforge.net,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH 4/4] kdb: Replace deprecated strcpy() with helper function in kdb_defcmd()
Date: Mon, 18 Aug 2025 22:59:35 +0200 [thread overview]
Message-ID: <33D2B62D-9052-42A8-AB66-DF2903BBA52F@linux.dev> (raw)
In-Reply-To: <CAD=FV=UhEeZdCwL0kVmDHZF03q+Jp5iOiUvbNNoCDuBr3os9qQ@mail.gmail.com>
On 18. Aug 2025, at 22:42, Doug Anderson wrote:
>> + memcpy(s, str, len);
>> + s[len - 1] = '\0';
>
> Very nitty, but technically the above memcpy() could pass "len - 1", right?
Ah yes, I missed this after adding the manual NUL-termination.
I'll send a v2 tomorrow.
> It doesn't really matter other than the wasteful copy of 1-byte, so:
>
> Reviewed-by: Douglas Anderson <dianders@chromium.org>
Thanks,
Thorsten
prev parent reply other threads:[~2025-08-18 20:59 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-08-18 18:11 [PATCH 1/4] kdb: Replace deprecated strcpy() with memcpy() in kdb_strdup() Thorsten Blum
2025-08-18 18:11 ` [PATCH 2/4] kdb: Replace deprecated strcpy() with memmove() in vkdb_printf() Thorsten Blum
2025-08-18 18:11 ` [PATCH 3/4] kdb: Replace deprecated strcpy() with memcpy() in parse_grep() Thorsten Blum
2025-08-18 20:35 ` Doug Anderson
2025-08-18 18:11 ` [PATCH 4/4] kdb: Replace deprecated strcpy() with helper function in kdb_defcmd() Thorsten Blum
2025-08-18 20:42 ` Doug Anderson
2025-08-18 20:59 ` Thorsten Blum [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=33D2B62D-9052-42A8-AB66-DF2903BBA52F@linux.dev \
--to=thorsten.blum@linux.dev \
--cc=daniel@riscstar.com \
--cc=danielt@kernel.org \
--cc=dianders@chromium.org \
--cc=gregkh@linuxfoundation.org \
--cc=jason.wessel@windriver.com \
--cc=kgdb-bugreport@lists.sourceforge.net \
--cc=linux-hardening@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@treblig.org \
--cc=nir@lichtman.org \
--cc=yuran.pereira@hotmail.com \
--cc=zhangheng@kylinos.cn \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®