summaryrefslogtreecommitdiff
path: root/sbin
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>1996-09-01 15:30:19 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>1996-09-01 15:30:19 +0000
commit9435f46851bb0822fb093b6853202b28649a867a (patch)
tree4a6550ed3c1d0745201fbef682500e925ac1826d /sbin
parent79a9ba373b39d4532cb368863c51a21fc8764344 (diff)
oflow protection
Diffstat (limited to 'sbin')
-rw-r--r--sbin/dump/optr.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sbin/dump/optr.c b/sbin/dump/optr.c
index 2002d393b3a..6147b6772ce 100644
--- a/sbin/dump/optr.c
+++ b/sbin/dump/optr.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: optr.c,v 1.7 1996/09/01 13:12:35 deraadt Exp $ */
+/* $OpenBSD: optr.c,v 1.8 1996/09/01 15:30:18 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.7 1996/09/01 13:12:35 deraadt Exp $";
+static char rcsid[] = "$OpenBSD: optr.c,v 1.8 1996/09/01 15:30:18 deraadt Exp $";
#endif
#endif /* not lint */
@@ -270,7 +270,7 @@ sendmes(tty, message)
FILE *f_tty;
(void) strcpy(t, _PATH_DEV);
- (void) strncat(t, tty, sizeof t);
+ (void) strncat(t, tty, sizeof t - strlen(_PATH_DEV));
if ((f_tty = fopen(t, "w")) != NULL) {
setbuf(f_tty, buf);