Re: [PATCH] i2c: replace deprecated strncpy

2023-09-22 Thread Wolfram Sang
On Wed, Sep 20, 2023 at 11:07:35AM +, Justin Stitt wrote: > `strncpy` is deprecated for use on NUL-terminated destination strings [1]. > > We should prefer more robust and less ambiguous string interfaces. > > `info.type` is expected to be NUL-terminated judging by its use in >

Re: [PATCH] i2c: replace deprecated strncpy

2023-09-20 Thread Kees Cook
On Wed, Sep 20, 2023 at 11:07:35AM +, Justin Stitt wrote: > `strncpy` is deprecated for use on NUL-terminated destination strings [1]. > > We should prefer more robust and less ambiguous string interfaces. > > `info.type` is expected to be NUL-terminated judging by its use in >

[PATCH] i2c: replace deprecated strncpy

2023-09-20 Thread Justin Stitt
`strncpy` is deprecated for use on NUL-terminated destination strings [1]. We should prefer more robust and less ambiguous string interfaces. `info.type` is expected to be NUL-terminated judging by its use in `i2c_new_client_device()` wherein it is used to populate `client->name`: |