summaryrefslogtreecommitdiff
path: root/usr.bin/lam
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2003-04-05 16:24:24 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2003-04-05 16:24:24 +0000
commit7a7d941e09fe1020cecfef3a5fb2ea5c833934f1 (patch)
treecf1b75f388d9a8f26aa89be3c53c9a9151546f59 /usr.bin/lam
parentbc85ba2f1d090d089db081ce0f3d420e36c6772d (diff)
simple snprintf; miod ok
Diffstat (limited to 'usr.bin/lam')
-rw-r--r--usr.bin/lam/lam.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/usr.bin/lam/lam.c b/usr.bin/lam/lam.c
index 4630c4dde30..732db18e274 100644
--- a/usr.bin/lam/lam.c
+++ b/usr.bin/lam/lam.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: lam.c,v 1.4 2002/02/16 21:27:47 millert Exp $ */
+/* $OpenBSD: lam.c,v 1.5 2003/04/05 16:24:23 deraadt Exp $ */
/* $NetBSD: lam.c,v 1.2 1994/11/14 20:27:42 jtc Exp $ */
/*-
@@ -44,7 +44,7 @@ static char copyright[] =
#if 0
static char sccsid[] = "@(#)lam.c 8.1 (Berkeley) 6/6/93";
#endif
-static char rcsid[] = "$OpenBSD: lam.c,v 1.4 2002/02/16 21:27:47 millert Exp $";
+static char rcsid[] = "$OpenBSD: lam.c,v 1.5 2003/04/05 16:24:23 deraadt Exp $";
#endif /* not lint */
/*
@@ -157,7 +157,8 @@ getargs(av)
fmtp += strlen(fmtp) + 1;
if (fmtp > fmtbuf + BUFSIZ)
error("No more format space", "");
- sprintf(fmtp, "%%%ss", p);
+ snprintf(fmtp, fmtbuf + BUFSIZ - fmtp,
+ "%%%ss", p);
ip->format = fmtp;
}
else