-----Original Message-----
From: <[email protected]> on behalf of Mateusz Guzik
<[email protected]>
Date: 2020-08-10, Monday at 03:40
To: <[email protected]>, <[email protected]>,
<[email protected]>
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);
/*
_______________________________________________
[email protected] mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "[email protected]"