summaryrefslogtreecommitdiff
path: root/usr.bin/size
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2003-04-08 00:53:56 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2003-04-08 00:53:56 +0000
commit5c699a9af0eb73f38065d491542dc93b9bc9c68b (patch)
tree5d2dd1ffe66a962b74df4f42c136a5a0432c821f /usr.bin/size
parent7dda8a36cf5a6b514b3be3d61ff7a0ec0c0c9e4f (diff)
snprintf; ok tdeval
Diffstat (limited to 'usr.bin/size')
-rw-r--r--usr.bin/size/size.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/usr.bin/size/size.c b/usr.bin/size/size.c
index 8b952e8b51e..c1b5b221a53 100644
--- a/usr.bin/size/size.c
+++ b/usr.bin/size/size.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: size.c,v 1.15 2003/03/30 20:47:15 deraadt Exp $ */
+/* $OpenBSD: size.c,v 1.16 2003/04/08 00:53:55 deraadt Exp $ */
/* $NetBSD: size.c,v 1.7 1996/01/14 23:07:12 pk Exp $ */
/*
@@ -44,7 +44,7 @@ static char copyright[] =
#if 0
static char sccsid[] = "@(#)size.c 8.2 (Berkeley) 12/9/93";
#endif
-static char rcsid[] = "$OpenBSD: size.c,v 1.15 2003/03/30 20:47:15 deraadt Exp $";
+static char rcsid[] = "$OpenBSD: size.c,v 1.16 2003/04/08 00:53:55 deraadt Exp $";
#endif /* not lint */
#include <sys/param.h>
@@ -204,7 +204,7 @@ show_archive(count, fname, fp)
*/
p = name;
if (count > 1)
- p += sprintf(p, "%s:", fname);
+ p += snprintf(name, baselen - 1, "%s:", fname);
#ifdef AR_EFMT1
/*
* BSD 4.4 extended AR format: #1/<namelen>, with name as the