diff options
author | 2003-04-05 16:24:23 +0000 | |
---|---|---|
committer | 2003-04-05 16:24:23 +0000 | |
commit | 235c915fa00de28bf7dbb217112f7bd1dbbf5275 (patch) | |
tree | 2111d38a98c9cc0fce066f2de3afba83fdfd4d54 | |
parent | strlcpy whack; miod ok (diff) | |
download | wireguard-openbsd-235c915fa00de28bf7dbb217112f7bd1dbbf5275.tar.xz wireguard-openbsd-235c915fa00de28bf7dbb217112f7bd1dbbf5275.zip |
simple snprintf; miod ok
-rw-r--r-- | usr.bin/lam/lam.c | 7 |
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 |