summaryrefslogtreecommitdiff
path: root/sbin/dump/optr.c
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>1996-08-05 11:51:17 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>1996-08-05 11:51:17 +0000
commit08ed6c3ccc1f2f1a83dc8d95ecbd71fc216e8712 (patch)
tree566e2e4d8b8c34f56511ff5b9443ca4c2200341b /sbin/dump/optr.c
parent97ca36d2603aaf8df3de8704579ec1adec16e8b2 (diff)
careful about buffer
Diffstat (limited to 'sbin/dump/optr.c')
-rw-r--r--sbin/dump/optr.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/sbin/dump/optr.c b/sbin/dump/optr.c
index dc2cd8f16e1..ccf073580ad 100644
--- a/sbin/dump/optr.c
+++ b/sbin/dump/optr.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: optr.c,v 1.4 1996/06/23 14:30:11 deraadt Exp $ */
+/* $OpenBSD: optr.c,v 1.5 1996/08/05 11:51:16 deraadt Exp $ */
/* $NetBSD: optr.c,v 1.4 1996/05/18 16:16:17 jtk Exp $ */
/*-
@@ -38,7 +38,7 @@
#if 0
static char sccsid[] = "@(#)optr.c 8.2 (Berkeley) 1/6/94";
#else
-static char rcsid[] = "$OpenBSD: optr.c,v 1.4 1996/06/23 14:30:11 deraadt Exp $";
+static char rcsid[] = "$OpenBSD: optr.c,v 1.5 1996/08/05 11:51:16 deraadt Exp $";
#endif
#endif /* not lint */
@@ -269,13 +269,13 @@ static void
sendmes(tty, message)
char *tty, *message;
{
- char t[50], buf[BUFSIZ];
+ char t[MAXPATHLEN], buf[BUFSIZ];
register char *cp;
int lmsg = 1;
FILE *f_tty;
(void) strcpy(t, _PATH_DEV);
- (void) strcat(t, tty);
+ (void) strncat(t, sizeof t, tty);
if ((f_tty = fopen(t, "w")) != NULL) {
setbuf(f_tty, buf);