Re: [PATCH v2] hwmon: (ibmpowernv) refactor deprecated strncpy

2023-09-29 Thread Kees Cook
On Tue, 19 Sep 2023 05:22:51 +, Justin Stitt wrote: > `strncpy` is deprecated for use on NUL-terminated destination strings [1]. > > A suitable replacement is `memcpy` as we've already precisely calculated > the number of bytes to copy while `buf` has been explicitly > zero-initialized: > |

Re: [PATCH v2] hwmon: (ibmpowernv) refactor deprecated strncpy

2023-09-19 Thread Michael Ellerman
Justin Stitt writes: > `strncpy` is deprecated for use on NUL-terminated destination strings [1]. > > A suitable replacement is `memcpy` as we've already precisely calculated > the number of bytes to copy while `buf` has been explicitly > zero-initialized: > | char buf[8] = { 0 }; > > Link:

[PATCH v2] hwmon: (ibmpowernv) refactor deprecated strncpy

2023-09-18 Thread Justin Stitt
`strncpy` is deprecated for use on NUL-terminated destination strings [1]. A suitable replacement is `memcpy` as we've already precisely calculated the number of bytes to copy while `buf` has been explicitly zero-initialized: | char buf[8] = { 0 }; Link: