`strncpy` is deprecated for use on NUL-terminated destination strings [1].
We see that `prop->cpucp_info.card_name` is supposed to be
NUL-terminated based on its usage within `__hwmon_device_register()`
(wherein it's called "name"):
| if (name && (!strlen(name) || strpbrk(name, "-* \t\n")))
On Fri, Aug 25, 2023 at 10:09:51PM +, Justin Stitt wrote:
> `strncpy` is deprecated for use on NUL-terminated destination strings [1].
>
> We see that `prop->cpucp_info.card_name` is supposed to be
> NUL-terminated based on its usage within `__hwmon_device_register()`
> (wherein it's called "n
On Sat, Aug 26, 2023 at 1:13 AM Kees Cook wrote:
>
> On Fri, Aug 25, 2023 at 10:09:51PM +, Justin Stitt wrote:
> > `strncpy` is deprecated for use on NUL-terminated destination strings [1].
> >
> > We see that `prop->cpucp_info.card_name` is supposed to be
> > NUL-terminated based on its usage