Re: [PATCH 6/6] usbip: vhci_sysfs: Use safer strscpy() instead of strcpy()
From: Shuah Khan
Date: Tue Mar 24 2026 - 17:35:16 EST
On 3/11/26 01:22, Dan Carpenter wrote:
On Tue, Mar 10, 2026 at 04:10:20PM -0600, Shuah Khan wrote:
On 3/10/26 03:44, Ai Chao wrote:
Use a safer function strscpy() instead of strcpy() for copying to
arrays.
Only idiomatic code replacement, and no functional changes.
It is a functional change since it calls a new routine. Get rid
of this line from change log.
How did you test this patch? I am curious because of you are
describing the change as "idiomatic code replacement"
I liked the commit message... To me it says that patch affect
runtime. It doesn' fix any bugs or introduce any bugs. Too often
these changes are sold as a "potential" bugfix, which means people
haven't bothered to check whether it fixes a bug or not.
It's the right thing to add a note under the --- cut off that the
patch hasn't been tested. Testing isn't required for this sort
of patch but a note is good so reviewers will know to be careful.
I would like to see some sort of testing for patches like this one.
It isn't hard to test this change.
thanks,
-- Shuah