Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 15 Jan 2019 06:52:35 +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-11@freebsd.org
Subject:   svn commit: r343040 - stable/11/lib/libutil
Message-ID:  <201901150652.x0F6qZUr010980@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
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]);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201901150652.x0F6qZUr010980>