diff options
-rw-r--r-- | sbin/newfs/mkfs.c | 6 | ||||
-rw-r--r-- | sbin/newfs_msdos/newfs_msdos.c | 2 |
2 files changed, 4 insertions, 4 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"); diff --git a/sbin/newfs_msdos/newfs_msdos.c b/sbin/newfs_msdos/newfs_msdos.c index acfd782f55e..c82aec440dd 100644 --- a/sbin/newfs_msdos/newfs_msdos.c +++ b/sbin/newfs_msdos/newfs_msdos.c @@ -634,7 +634,7 @@ main(int argc, char *argv[]) (u_int)tm->tm_min)); mk4(bsx->volid, x); mklabel(bsx->label, opt_L ? opt_L : "NO NAME"); - sprintf(buf, "FAT%u", fat); + snprintf(buf, sizeof buf, "FAT%u", fat); setstr(bsx->type, buf, sizeof(bsx->type)); if (!opt_B) { x1 += sizeof(struct bsx); |