git: 033820ace724 - stable/13 - nfs: even up value returned by nfsrv_parsename with copyinstr

Mateusz Guzik mjg at FreeBSD.org
Mon Jun 7 00:30:00 UTC 2021


The branch stable/13 has been updated by mjg:

URL: https://cgit.FreeBSD.org/src/commit/?id=033820ace7241fce49066a88c622d15a194fac00

commit 033820ace7241fce49066a88c622d15a194fac00
Author:     Mateusz Guzik <mjg at FreeBSD.org>
AuthorDate: 2021-05-31 16:32:04 +0000
Commit:     Mateusz Guzik <mjg at FreeBSD.org>
CommitDate: 2021-06-07 00:29:38 +0000

    nfs: even up value returned by nfsrv_parsename with copyinstr
    
    Reported by:    dim
    Reviewed by:    rmacklem
    
    (cherry picked from commit 68c254426467e3f900f9a19de4dd9a234ea75388)
---
 sys/fs/nfsserver/nfs_nfsdsubs.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sys/fs/nfsserver/nfs_nfsdsubs.c b/sys/fs/nfsserver/nfs_nfsdsubs.c
index 49c5cac999c7..d407dad8367d 100644
--- a/sys/fs/nfsserver/nfs_nfsdsubs.c
+++ b/sys/fs/nfsserver/nfs_nfsdsubs.c
@@ -2064,7 +2064,7 @@ nfsrv_parsename(struct nfsrv_descript *nd, char *bufp, u_long *hashp,
 	    }
 	}
 	*tocp = '\0';
-	*outlenp = (size_t)outlen;
+	*outlenp = (size_t)outlen + 1;
 	if (hashp != NULL)
 		*hashp = hash;
 nfsmout:


More information about the dev-commits-src-all mailing list