svn commit: r343040 - stable/11/lib/libutil
Xin LI
delphij at FreeBSD.org
Tue Jan 15 06:52:36 UTC 2019
Author: delphij
Date: Tue Jan 15 06:52:34 2019
New Revision: 343040
URL: https://svnweb.freebsd.org/changeset/base/343040
Log:
MFC r342640: Ensure buffer is nul-terminated.
Modified:
stable/11/lib/libutil/quotafile.c
Directory Properties:
stable/11/ (props changed)
Modified: stable/11/lib/libutil/quotafile.c
==============================================================================
--- stable/11/lib/libutil/quotafile.c Tue Jan 15 06:50:51 2019 (r343039)
+++ stable/11/lib/libutil/quotafile.c Tue Jan 15 06:52:34 2019 (r343040)
@@ -101,7 +101,7 @@ hasquota(struct fstab *fs, int type, char *qfnamep, in
return (0);
}
if (cp) {
- strncpy(qfnamep, cp, qfbufsize);
+ strlcpy(qfnamep, cp, qfbufsize);
} else {
(void)snprintf(qfnamep, qfbufsize, "%s/%s.%s", fs->fs_file,
QUOTAFILENAME, qfextension[type]);
More information about the svn-src-stable
mailing list