Re: [PATCH 03/64] rpmsg: glink: Replace strncpy() with strscpy_pad()

2021-07-27 Thread Gustavo A. R. Silva
On Tue, Jul 27, 2021 at 01:57:54PM -0700, Kees Cook wrote: > The use of strncpy() is considered deprecated for NUL-terminated > strings[1]. Replace strncpy() with strscpy_pad() (as it seems this case > expects the NUL padding to fill the allocation following the flexible > array). This

[PATCH 03/64] rpmsg: glink: Replace strncpy() with strscpy_pad()

2021-07-27 Thread Kees Cook
The use of strncpy() is considered deprecated for NUL-terminated strings[1]. Replace strncpy() with strscpy_pad() (as it seems this case expects the NUL padding to fill the allocation following the flexible array). This additionally silences a warning seen when building under -Warray-bounds: