diff options
author | 1999-06-02 18:45:39 +0000 | |
---|---|---|
committer | 1999-06-02 18:45:39 +0000 | |
commit | 595f9ac76139deb3ea719d9ee1c77aa6c26b29a7 (patch) | |
tree | 3bc76a80fb4245b8a3f00d61e5fbbc61fda528eb | |
parent | o Alter the mbuf type as it's processed by different layers. (diff) | |
download | wireguard-openbsd-595f9ac76139deb3ea719d9ee1c77aa6c26b29a7.tar.xz wireguard-openbsd-595f9ac76139deb3ea719d9ee1c77aa6c26b29a7.zip |
snprintf
-rw-r--r-- | sbin/slattach/slattach.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/sbin/slattach/slattach.c b/sbin/slattach/slattach.c index 0d3570df548..1da756af1c7 100644 --- a/sbin/slattach/slattach.c +++ b/sbin/slattach/slattach.c @@ -1,4 +1,4 @@ -/* $OpenBSD: slattach.c,v 1.5 1996/11/13 07:17:20 downsj Exp $ */ +/* $OpenBSD: slattach.c,v 1.6 1999/06/02 18:45:39 deraadt Exp $ */ /* $NetBSD: slattach.c,v 1.17 1996/05/19 21:57:39 jonathan Exp $ */ /* @@ -47,7 +47,7 @@ static char copyright[] = #if 0 static char sccsid[] = "@(#)slattach.c 8.2 (Berkeley) 1/7/94"; #else -static char rcsid[] = "$OpenBSD: slattach.c,v 1.5 1996/11/13 07:17:20 downsj Exp $"; +static char rcsid[] = "$OpenBSD: slattach.c,v 1.6 1999/06/02 18:45:39 deraadt Exp $"; #endif #endif /* not lint */ @@ -163,7 +163,8 @@ main(argc, argv) ; if(dev[i] == '/') i++; - (void) sprintf(pidfilename, "%sslip.%s.pid", _PATH_VARRUN, dev + i); + (void) snprintf(pidfilename, sizeof pidfilename, + "%sslip.%s.pid", _PATH_VARRUN, dev + i); truncate(pidfilename, 0); /* If this fails, so will the next one... */ if ((pidfile = fopen(pidfilename, "w")) != NULL) { fprintf(pidfile, "%d\n", pid); |