net/rds: Replace deprecated strncpy() with strscpy_pad()
authorThorsten Blum <thorsten.blum@linux.dev>
Wed, 19 Feb 2025 22:47:31 +0000 (23:47 +0100)
committerJakub Kicinski <kuba@kernel.org>
Fri, 21 Feb 2025 23:51:26 +0000 (15:51 -0800)
commitc451715d78e31a27afaad35ee0e9a915935cd6ea
treecb0e593ae746e071f266fdedf54db3e61c7a77f2
parent376cd9a2abe4b630e76ae5a3d68f7483edd42003
net/rds: Replace deprecated strncpy() with strscpy_pad()

strncpy() is deprecated for NUL-terminated destination buffers. Use
strscpy_pad() instead and remove the manual NUL-termination.

Compile-tested only.

Link: https://github.com/KSPP/linux/issues/90
Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev>
Reviewed-by: Kees Cook <kees@kernel.org>
Reviewed-by: Allison Henderson <allison.henderson@oracle.com>
Tested-by: Allison Henderson <allison.henderson@oracle.com>
Link: https://patch.msgid.link/20250219224730.73093-2-thorsten.blum@linux.dev
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
net/rds/stats.c