summaryrefslogtreecommitdiffstats
path: root/sbin/newfs/mkfs.c
diff options
context:
space:
mode:
authorkris <kris@FreeBSD.org>2001-04-24 10:26:00 +0000
committerkris <kris@FreeBSD.org>2001-04-24 10:26:00 +0000
commit3edf709f74475d34ec86309e00d1b7aefdda2618 (patch)
tree1e6f7ac7f14cfb84c86f3beed70b777049f1e48c /sbin/newfs/mkfs.c
parentd5df9464e24a4e140b885df04c676bea637d0070 (diff)
downloadFreeBSD-src-3edf709f74475d34ec86309e00d1b7aefdda2618.zip
FreeBSD-src-3edf709f74475d34ec86309e00d1b7aefdda2618.tar.gz
sprintf() -> snprintf()
Partially submitted by: "Andrew R. Reiter" <arr@watson.org> Obtained from: OpenBSD
Diffstat (limited to 'sbin/newfs/mkfs.c')
-rw-r--r--sbin/newfs/mkfs.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sbin/newfs/mkfs.c b/sbin/newfs/mkfs.c
index 9ac5502..28334e6 100644
--- a/sbin/newfs/mkfs.c
+++ b/sbin/newfs/mkfs.c
@@ -710,7 +710,7 @@ next:
initcg(cylno, utime);
if (mfs)
continue;
- j = sprintf(tmpbuf, " %ld%s",
+ j = snprintf(tmpbuf, sizeof(tmpbuf), " %ld%s",
fsbtodb(&sblock, cgsblock(&sblock, cylno)),
cylno < (sblock.fs_ncg-1) ? "," : "" );
if (i + j >= width) {
OpenPOWER on IntegriCloud