summaryrefslogtreecommitdiff
path: root/usr.bin/systat/netstat.c
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>1997-12-19 09:36:51 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>1997-12-19 09:36:51 +0000
commit624998fe3168ff774af7880a4ed174b959707308 (patch)
tree0d687eb1f598153e10042d35a5beb65f582aa274 /usr.bin/systat/netstat.c
parent48b79355e8158dba87f3c34b2173ce2a85987682 (diff)
careful
Diffstat (limited to 'usr.bin/systat/netstat.c')
-rw-r--r--usr.bin/systat/netstat.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/usr.bin/systat/netstat.c b/usr.bin/systat/netstat.c
index 5e9ceaeba31..1f9ebea725a 100644
--- a/usr.bin/systat/netstat.c
+++ b/usr.bin/systat/netstat.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: netstat.c,v 1.9 1997/12/19 09:22:55 deraadt Exp $ */
+/* $OpenBSD: netstat.c,v 1.10 1997/12/19 09:36:50 deraadt Exp $ */
/* $NetBSD: netstat.c,v 1.3 1995/06/18 23:53:07 cgd Exp $ */
/*-
@@ -38,7 +38,7 @@
#if 0
static char sccsid[] = "@(#)netstat.c 8.1 (Berkeley) 6/6/93";
#endif
-static char rcsid[] = "$OpenBSD: netstat.c,v 1.9 1997/12/19 09:22:55 deraadt Exp $";
+static char rcsid[] = "$OpenBSD: netstat.c,v 1.10 1997/12/19 09:36:50 deraadt Exp $";
#endif /* not lint */
/*
@@ -400,7 +400,7 @@ inetprint(in, port, proto)
ntohs((u_short)port));
/* pad to full column to clear any garbage */
cp = strchr(line, '\0');
- while (cp - line < 22)
+ while (cp - line < 22 && cp - line < sizeof line-1)
*cp++ = ' ';
*cp = '\0';
waddstr(wnd, line);