Re: [PATCH] ACPI: replace deprecated strncpy with strscpy

2023-10-20 Thread Rafael J. Wysocki
On Fri, Oct 20, 2023 at 1:06 AM Kees Cook wrote: > > On Thu, Oct 19, 2023 at 10:47:58PM +, Justin Stitt wrote: > > strncpy() is deprecated for use on NUL-terminated destination strings > > [1] and as such we should prefer more robust and less ambiguous string > > interfaces. > > > > We know de

Re: [PATCH] ACPI: replace deprecated strncpy with strscpy

2023-10-19 Thread Kees Cook
On Thu, Oct 19, 2023 at 10:47:58PM +, Justin Stitt wrote: > strncpy() is deprecated for use on NUL-terminated destination strings > [1] and as such we should prefer more robust and less ambiguous string > interfaces. > > We know dev->name should be NUL-terminated based on the presence of a > m

[PATCH] ACPI: replace deprecated strncpy with strscpy

2023-10-19 Thread Justin Stitt
strncpy() is deprecated for use on NUL-terminated destination strings [1] and as such we should prefer more robust and less ambiguous string interfaces. We know dev->name should be NUL-terminated based on the presence of a manual NUL-byte assignment. NUL-padding is not required as dev is already