svn commit: r343039 - stable/12/lib/libutil
Xin LI
delphij at FreeBSD.org
Tue Jan 15 06:50:53 UTC 2019
Author: delphij
Date: Tue Jan 15 06:50:51 2019
New Revision: 343039
URL: https://svnweb.freebsd.org/changeset/base/343039
Log:
MFC r342640: Ensure buffer is nul-terminated.
Modified:
stable/12/lib/libutil/quotafile.c
Directory Properties:
stable/12/ (props changed)
Modified: stable/12/lib/libutil/quotafile.c
==============================================================================
--- stable/12/lib/libutil/quotafile.c Tue Jan 15 06:44:37 2019 (r343038)
+++ stable/12/lib/libutil/quotafile.c Tue Jan 15 06:50:51 2019 (r343039)
@@ -103,7 +103,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-all
mailing list