diff options
author | Jason Downs <downsj@cvs.openbsd.org> | 1996-10-25 06:27:43 +0000 |
---|---|---|
committer | Jason Downs <downsj@cvs.openbsd.org> | 1996-10-25 06:27:43 +0000 |
commit | 373fc3f5db0fd9358f6177754875693709bb81b3 (patch) | |
tree | 8243194457aff7c0a2a54bf18999834438d5aff3 | |
parent | a3b9838fbf80be0c0da02254378c06702c5a651d (diff) |
sprintf -> snprintf
-rw-r--r-- | usr.bin/apropos/apropos.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/usr.bin/apropos/apropos.c b/usr.bin/apropos/apropos.c index b430400e678..2d233702c8c 100644 --- a/usr.bin/apropos/apropos.c +++ b/usr.bin/apropos/apropos.c @@ -1,4 +1,4 @@ -/* $OpenBSD: apropos.c,v 1.2 1996/06/26 05:31:14 deraadt Exp $ */ +/* $OpenBSD: apropos.c,v 1.3 1996/10/25 06:27:42 downsj Exp $ */ /* $NetBSD: apropos.c,v 1.5 1995/09/04 20:46:20 tls Exp $ */ /* @@ -44,7 +44,7 @@ static char copyright[] = #if 0 static char sccsid[] = "@(#)apropos.c 8.8 (Berkeley) 5/4/95"; #else -static char rcsid[] = "$OpenBSD: apropos.c,v 1.2 1996/06/26 05:31:14 deraadt Exp $"; +static char rcsid[] = "$OpenBSD: apropos.c,v 1.3 1996/10/25 06:27:42 downsj Exp $"; #endif #endif /* not lint */ @@ -149,7 +149,8 @@ apropos(argv, path, buildpath) if (buildpath) { char hold[MAXPATHLEN + 1]; - (void)sprintf(hold, "%s/%s", name, _PATH_WHATIS); + (void)snprintf(hold, sizeof(hold), "%s/%s", name, + _PATH_WHATIS); name = hold; } |