diff options
author | kris <kris@FreeBSD.org> | 1999-06-06 07:18:49 +0000 |
---|---|---|
committer | kris <kris@FreeBSD.org> | 1999-06-06 07:18:49 +0000 |
commit | 951fba952cce980872ee2be2a75ebdba2a28b643 (patch) | |
tree | 5f834f321fc1b91c088e993175f14be3add23b75 /sbin | |
parent | f40f015be9fdde8af432707fbebe0acf7610c6f1 (diff) | |
download | FreeBSD-src-951fba952cce980872ee2be2a75ebdba2a28b643.zip FreeBSD-src-951fba952cce980872ee2be2a75ebdba2a28b643.tar.gz |
sprintf -> snprintf
Obtained from: OpenBSD
Diffstat (limited to 'sbin')
-rw-r--r-- | sbin/slattach/slattach.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/sbin/slattach/slattach.c b/sbin/slattach/slattach.c index 3e77c12..36a7a3b5 100644 --- a/sbin/slattach/slattach.c +++ b/sbin/slattach/slattach.c @@ -45,7 +45,7 @@ static const char copyright[] = static char sccsid[] = "from: @(#)slattach.c 4.6 (Berkeley) 6/1/90"; #endif static const char rcsid[] = - "$Id$"; + "$Id: slattach.c,v 1.34 1999/05/29 08:16:34 kris Exp $"; #endif /* not lint */ #include <sys/types.h> @@ -195,7 +195,8 @@ main(int argc, char **argv) } dvname = strrchr(dev, '/'); /* always succeeds */ dvname++; /* trailing tty pathname component */ - sprintf(pidfilename, "%sslattach.%s.pid", _PATH_VARRUN, dvname); + snprintf(pidfilename, sizeof(pidfilename), + "%sslattach.%s.pid", _PATH_VARRUN, dvname); printf("%s\n",pidfilename); if (!foreground) |