Date: Mon, 10 Aug 2020 10:40:14 +0000 (UTC) From: Mateusz Guzik <mjg@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r364071 - head/sys/kern Message-ID: <202008101040.07AAeEtt096924@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
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 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); /*
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202008101040.07AAeEtt096924>