Date: Tue, 15 Jan 2019 06:50:52 +0000 (UTC) From: Xin LI <delphij@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r343039 - stable/12/lib/libutil Message-ID: <201901150650.x0F6oqIQ006138@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
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]);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201901150650.x0F6oqIQ006138>