Re: [PATCH] cpufreq: refactor deprecated strncpy

2023-09-14 Thread Kees Cook
On Wed, Sep 13, 2023 at 12:07:21AM +, Justin Stitt wrote: > `strncpy` is deprecated for use on NUL-terminated destination strings [1]. > > We should prefer more robust and less ambiguous string interfaces. > > Both `policy->last_governor` and `default_governor` are expected to be >

[PATCH] cpufreq: refactor deprecated strncpy

2023-09-12 Thread Justin Stitt
`strncpy` is deprecated for use on NUL-terminated destination strings [1]. We should prefer more robust and less ambiguous string interfaces. Both `policy->last_governor` and `default_governor` are expected to be NUL-terminated which is shown by their heavy usage with other string apis like