Re: [PATCH net-next] net/rds: Replace deprecated strncpy() with strscpy_pad()

2025-02-20 Thread Allison Henderson
On Thu, 2025-02-20 at 11:07 -0700, Allison Henderson wrote: > On Wed, 2025-02-19 at 23:47 +0100, Thorsten Blum wrote: > > strncpy() is deprecated for NUL-terminated destination buffers. Use > > strscpy_pad() instead and remove the manual NUL-termination. > > > > Compile

Re: [PATCH net-next] net/rds: Replace deprecated strncpy() with strscpy_pad()

2025-02-20 Thread Allison Henderson
i++) { > BUG_ON(strlen(names[i]) >= sizeof(ctr.name)); > - strncpy(ctr.name, names[i], sizeof(ctr.name) - 1); > - ctr.name[sizeof(ctr.name) - 1] = '\0'; > + strscpy_pad(ctr.name, names[i]); >