summaryrefslogtreecommitdiff
path: root/sbin
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2003-04-04 00:42:35 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2003-04-04 00:42:35 +0000
commitdaf329b1c0f01bbdd4028168949c69860a248f9e (patch)
treeca613584d0fe67c96c9239325b37011daa2ef3cc /sbin
parent51ea99310ccd7f074f3727add189ec97cde8b868 (diff)
snprintf & strlcpy; tedu ok
Diffstat (limited to 'sbin')
-rw-r--r--sbin/quotacheck/quotacheck.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/sbin/quotacheck/quotacheck.c b/sbin/quotacheck/quotacheck.c
index 9b9c4444962..84d730e8cd3 100644
--- a/sbin/quotacheck/quotacheck.c
+++ b/sbin/quotacheck/quotacheck.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: quotacheck.c,v 1.16 2003/03/13 09:09:27 deraadt Exp $ */
+/* $OpenBSD: quotacheck.c,v 1.17 2003/04/04 00:42:34 deraadt Exp $ */
/* $NetBSD: quotacheck.c,v 1.12 1996/03/30 22:34:25 mark Exp $ */
/*
@@ -47,7 +47,7 @@ static char copyright[] =
#if 0
static char sccsid[] = "@(#)quotacheck.c 8.3 (Berkeley) 1/29/94";
#else
-static char rcsid[] = "$OpenBSD: quotacheck.c,v 1.16 2003/03/13 09:09:27 deraadt Exp $";
+static char rcsid[] = "$OpenBSD: quotacheck.c,v 1.17 2003/04/04 00:42:34 deraadt Exp $";
#endif
#endif /* not lint */
@@ -236,11 +236,11 @@ needchk(struct fstab *fs)
err(1, "%s", strerror(errno));
qnp->flags = 0;
if (gflag && hasquota(fs, GRPQUOTA, &qfnp)) {
- strcpy(qnp->grpqfname, qfnp);
+ strlcpy(qnp->grpqfname, qfnp, sizeof qnp->grpqfname);
qnp->flags |= HASGRP;
}
if (uflag && hasquota(fs, USRQUOTA, &qfnp)) {
- strcpy(qnp->usrqfname, qfnp);
+ strlcpy(qnp->usrqfname, qfnp, sizeof qnp->usrqfname);
qnp->flags |= HASUSR;
}
if (qnp->flags)