Re: [PATCH 4/4] kdb: Replace deprecated strcpy() with helper function in kdb_defcmd()
From: Thorsten Blum
Date: Mon Aug 18 2025 - 17:01:29 EST
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@xxxxxxxxxxxx>
Thanks,
Thorsten