Re: [PATCH 02/13] staging: greybus: Switch from strlcpy to strscpy

2021-02-16 Thread Alex Elder
On 2/16/21 9:48 AM, Kumar Kartikeya Dwivedi wrote: On Tue, Feb 16, 2021 at 08:24:59PM IST, Alex Elder wrote: This is a good change. But while you're at it, I would appreciate if you would convert a few spots to use sizeof(dest) rather than a fixed constant. I will point them out below. If

Re: [PATCH 02/13] staging: greybus: Switch from strlcpy to strscpy

2021-02-16 Thread Kumar Kartikeya Dwivedi
On Tue, Feb 16, 2021 at 08:24:59PM IST, Alex Elder wrote: > This is a good change. But while you're at it, I would > appreciate if you would convert a few spots to use > sizeof(dest) rather than a fixed constant. I will > point them out below. > > If this is the *only* request for a change on

Re: [PATCH 02/13] staging: greybus: Switch from strlcpy to strscpy

2021-02-16 Thread Alex Elder
On 1/31/21 11:28 AM, Kumar Kartikeya Dwivedi wrote: strlcpy is marked as deprecated in Documentation/process/deprecated.rst, and there is no functional difference when the caller expects truncation (when not checking the return value). strscpy is relatively better as it also avoids scanning the

[PATCH 02/13] staging: greybus: Switch from strlcpy to strscpy

2021-01-31 Thread Kumar Kartikeya Dwivedi
strlcpy is marked as deprecated in Documentation/process/deprecated.rst, and there is no functional difference when the caller expects truncation (when not checking the return value). strscpy is relatively better as it also avoids scanning the whole source string. This silences the related