NFS: Fix an off by one in root_nfs_cat()
authorChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Sun, 18 Feb 2024 21:16:53 +0000 (22:16 +0100)
committerTrond Myklebust <trond.myklebust@hammerspace.com>
Sat, 9 Mar 2024 14:14:51 +0000 (09:14 -0500)
commit698ad1a538da0b6bf969cfee630b4e3a026afb87
treeed2c010820266d04cda083361d58657f1013e1f0
parent1548036ef1204df65ca5a16e8b199c858cb80075
NFS: Fix an off by one in root_nfs_cat()

The intent is to check if 'dest' is truncated or not. So, >= should be
used instead of >, because strlcat() returns the length of 'dest' and 'src'
excluding the trailing NULL.

Fixes: 56463e50d1fc ("NFS: Use super.c for NFSROOT mount option parsing")
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>
fs/nfs/nfsroot.c