Re: [PATCH v2] drm/gma500: refactor deprecated strncpy

2023-09-27 Thread Patrik Jakobsson
On Tue, Sep 19, 2023 at 04:41:16AM +, Justin Stitt wrote: > `strncpy` is deprecated for use on NUL-terminated destination strings [1]. > > We should prefer more robust and less ambiguous string interfaces. > > Since `chan->base.name` is expected to be NUL-terminated, a suitable > replacement

Re: [PATCH v2] drm/gma500: refactor deprecated strncpy

2023-09-23 Thread Kees Cook
On Tue, Sep 19, 2023 at 04:41:16AM +, Justin Stitt wrote: > `strncpy` is deprecated for use on NUL-terminated destination strings [1]. > > We should prefer more robust and less ambiguous string interfaces. > > Since `chan->base.name` is expected to be NUL-terminated, a suitable > replacement

[PATCH v2] drm/gma500: refactor deprecated strncpy

2023-09-18 Thread Justin Stitt
`strncpy` is deprecated for use on NUL-terminated destination strings [1]. We should prefer more robust and less ambiguous string interfaces. Since `chan->base.name` is expected to be NUL-terminated, a suitable replacement is `strscpy` [2] due to the fact that it guarantees NUL-termination on