summaryrefslogtreecommitdiff
path: root/sbin/newfs/mkfs.c
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2002-05-29 09:19:53 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2002-05-29 09:19:53 +0000
commita2f77e2c291ced0b85e36486c6ca1e2cfb53b64a (patch)
tree85f813cad0c29b4963fad90d0b56f26b307dc52a /sbin/newfs/mkfs.c
parent46aecf92d88c8914c462878f485c11755d4f7041 (diff)
more snprintf
Diffstat (limited to 'sbin/newfs/mkfs.c')
-rw-r--r--sbin/newfs/mkfs.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sbin/newfs/mkfs.c b/sbin/newfs/mkfs.c
index 0e21f95c6de..b46172d8bc6 100644
--- a/sbin/newfs/mkfs.c
+++ b/sbin/newfs/mkfs.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: mkfs.c,v 1.20 2001/11/05 07:39:17 mpech Exp $ */
+/* $OpenBSD: mkfs.c,v 1.21 2002/05/29 09:19:52 deraadt Exp $ */
/* $NetBSD: mkfs.c,v 1.25 1995/06/18 21:35:38 cgd Exp $ */
/*
@@ -38,7 +38,7 @@
#if 0
static char sccsid[] = "@(#)mkfs.c 8.3 (Berkeley) 2/3/94";
#else
-static char rcsid[] = "$OpenBSD: mkfs.c,v 1.20 2001/11/05 07:39:17 mpech Exp $";
+static char rcsid[] = "$OpenBSD: mkfs.c,v 1.21 2002/05/29 09:19:52 deraadt Exp $";
#endif
#endif /* not lint */
@@ -662,7 +662,7 @@ next:
initcg(cylno, utime);
if (quiet)
continue;
- j = sprintf(tmpbuf, " %ld,",
+ j = snprintf(tmpbuf, sizeof tmpbuf, " %ld,",
fsbtodb(&sblock, cgsblock(&sblock, cylno)));
if (i+j >= width) {
printf("\n");