net: sunrpc: Fix an off by one in rpc_sockaddr2uaddr()
authorChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Tue, 24 Oct 2023 21:58:20 +0000 (23:58 +0200)
committerTrond Myklebust <trond.myklebust@hammerspace.com>
Wed, 28 Feb 2024 21:18:18 +0000 (16:18 -0500)
commitd6f4de70f73a106986ee315d7d512539f2f3303a
treea9288e032c107cbefdc1336ff5ce8a5af34139a6
parent3f7edeac0bbb301a07d7ea2abd28727aaa7fdab0
net: sunrpc: Fix an off by one in rpc_sockaddr2uaddr()

The intent is to check if the strings' are truncated or not. So, >= should
be used instead of >, because strlcat() and snprintf() return the length of
the output, excluding the trailing NULL.

Fixes: a02d69261134 ("SUNRPC: Provide functions for managing universal addresses")
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Reviewed-by: Benjamin Coddington <bcodding@redhat.com>
Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
net/sunrpc/addr.c