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]); _______________________________________________ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"