diff options
author | kib <kib@FreeBSD.org> | 2009-03-20 10:59:06 +0000 |
---|---|---|
committer | kib <kib@FreeBSD.org> | 2009-03-20 10:59:06 +0000 |
commit | 6c64d839464d985311827eb8e31d3bbdb6523992 (patch) | |
tree | 3b945111bab8ef58c8a2be2e8f4a91aac420adf6 /sys/kern | |
parent | 0b55c1725c24fda75ca330fe85587e40199c5a6b (diff) | |
download | FreeBSD-src-6c64d839464d985311827eb8e31d3bbdb6523992.zip FreeBSD-src-6c64d839464d985311827eb8e31d3bbdb6523992.tar.gz |
The nc_nlen member of the struct namecache contains the length of the cached
name, not the length + 1.
PR: 132620, 132542
Reported by: bf2006a yahoo com
Tested by: bf2006a, pho
Reviewed by: marcus
Diffstat (limited to 'sys/kern')
-rw-r--r-- | sys/kern/vfs_cache.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/kern/vfs_cache.c b/sys/kern/vfs_cache.c index 44591c8..dedce0a 100644 --- a/sys/kern/vfs_cache.c +++ b/sys/kern/vfs_cache.c @@ -997,7 +997,7 @@ vn_fullpath1(struct thread *td, struct vnode *vp, struct vnode *rdir, ncp = TAILQ_FIRST(&vp->v_cache_dst); if (ncp != NULL) { MPASS(vp->v_dd == NULL || ncp->nc_dvp == vp->v_dd); - buflen -= ncp->nc_nlen - 1; + buflen -= ncp->nc_nlen; for (i = ncp->nc_nlen - 1; i >= 0 && bp != buf; i--) *--bp = ncp->nc_name[i]; if (bp == buf) { |