Re: [PATCH] firmware: tegra: bpmp: refactor deprecated strncpy

2023-09-14 Thread Kees Cook
On Wed, Sep 13, 2023 at 07:38:44PM +, Justin Stitt wrote: > `strncpy` is deprecated for use on NUL-terminated destination strings [1]. > > We should prefer more robust and less ambiguous string interfaces. > > It seems like the filename stored at `namevirt` is expected to be > NUL-terminated.

[PATCH] firmware: tegra: bpmp: refactor deprecated strncpy

2023-09-13 Thread Justin Stitt
`strncpy` is deprecated for use on NUL-terminated destination strings [1]. We should prefer more robust and less ambiguous string interfaces. It seems like the filename stored at `namevirt` is expected to be NUL-terminated. A suitable replacement is `strscpy_pad` due to the fact that it guarante