Re: [PATCH] can: peak_pci: replace deprecated strncpy with strscpy

2023-10-05 Thread Marc Kleine-Budde
On 05.10.2023 00:05:35, 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. > > NUL-padding is not required since card is already zero-initialized: > | card = kzallo

Re: [PATCH] can: peak_pci: replace deprecated strncpy with strscpy

2023-10-04 Thread Kees Cook
On Thu, Oct 05, 2023 at 12:05:35AM +, 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. > > NUL-padding is not required since card is already zero-initialized: > |

[PATCH] can: peak_pci: replace deprecated strncpy with strscpy

2023-10-04 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. NUL-padding is not required since card is already zero-initialized: | card = kzalloc(sizeof(*card), GFP_KERNEL); A suitable replacement is