svn commit: r364071 - head/sys/kern
Ravi Pokala
rpokala at freebsd.org
Mon Aug 10 22:41:50 UTC 2020
-----Original Message-----
From: <owner-src-committers at freebsd.org> on behalf of Mateusz Guzik <mjg at FreeBSD.org>
Date: 2020-08-10, Monday at 03:40
To: <src-committers at freebsd.org>, <svn-src-all at freebsd.org>, <svn-src-head at freebsd.org>
Subject: svn commit: r364071 - head/sys/kern
Author: mjg
Date: Mon Aug 10 10:40:14 2020
New Revision: 364071
URL: https://svnweb.freebsd.org/changeset/base/364071
Log:
cache: strlcpy -> memcpy
But why?
-Ravi (rpokala@)
Modified:
head/sys/kern/vfs_cache.c
Modified: head/sys/kern/vfs_cache.c
==============================================================================
--- head/sys/kern/vfs_cache.c Mon Aug 10 10:37:16 2020 (r364070)
+++ head/sys/kern/vfs_cache.c Mon Aug 10 10:40:14 2020 (r364071)
@@ -1934,7 +1934,8 @@ cache_enter_time(struct vnode *dvp, struct vnode *vp,
}
len = ncp->nc_nlen = cnp->cn_namelen;
hash = cache_get_hash(cnp->cn_nameptr, len, dvp);
- strlcpy(ncp->nc_name, cnp->cn_nameptr, len + 1);
+ memcpy(ncp->nc_name, cnp->cn_nameptr, len);
+ ncp->nc_name[len] = '\0';
cache_enter_lock(&cel, dvp, vp, hash);
/*
More information about the svn-src-all
mailing list