summaryrefslogtreecommitdiff
path: root/sbin/fsck_ffs/pass5.c
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2006-03-22 20:24:33 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2006-03-22 20:24:33 +0000
commit7a84eeaefb730ed882dadd3082e3d4f9c1edf250 (patch)
treefa7c5e94f9a0541e5026db02cf24056ae8b85592 /sbin/fsck_ffs/pass5.c
parent82b54f0f3f93de8d6fd760bb2514479ea752b604 (diff)
earlier asprintf diff caused malloc in signal handler. clarify the
code a bit more so that this mistake will not be done again
Diffstat (limited to 'sbin/fsck_ffs/pass5.c')
-rw-r--r--sbin/fsck_ffs/pass5.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/sbin/fsck_ffs/pass5.c b/sbin/fsck_ffs/pass5.c
index 5607605a8dd..450eb917d1e 100644
--- a/sbin/fsck_ffs/pass5.c
+++ b/sbin/fsck_ffs/pass5.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pass5.c,v 1.22 2006/03/12 02:28:28 deraadt Exp $ */
+/* $OpenBSD: pass5.c,v 1.23 2006/03/22 20:24:32 deraadt Exp $ */
/* $NetBSD: pass5.c,v 1.16 1996/09/27 22:45:18 christos Exp $ */
/*
@@ -34,7 +34,7 @@
#if 0
static char sccsid[] = "@(#)pass5.c 8.6 (Berkeley) 11/30/94";
#else
-static const char rcsid[] = "$OpenBSD: pass5.c,v 1.22 2006/03/12 02:28:28 deraadt Exp $";
+static const char rcsid[] = "$OpenBSD: pass5.c,v 1.23 2006/03/22 20:24:32 deraadt Exp $";
#endif
#endif /* not lint */
@@ -58,9 +58,9 @@ static int info_cg;
static int info_maxcg;
static int
-pass5_info(char *buf)
+pass5_info(char *buf, size_t buflen)
{
- return (asprintf(&buf, "phase 5, cg %d/%d",
+ return (snprintf(buf, buflen, "phase 5, cg %d/%d",
info_cg, info_maxcg) > 0);
}