summaryrefslogtreecommitdiff
path: root/usr.sbin/tcpdump
diff options
context:
space:
mode:
authorKevin Steves <stevesk@cvs.openbsd.org>2002-07-11 16:14:53 +0000
committerKevin Steves <stevesk@cvs.openbsd.org>2002-07-11 16:14:53 +0000
commit40a02c0ac98f358004fc061281f4ac9f29952510 (patch)
treed27376cc6f8213507a3348808dece4f02462a650 /usr.sbin/tcpdump
parentff83622b0eb65803cd287f23998e0a4de48e6f68 (diff)
print FQDN strings using correct length; ok ho@ jakob@
Diffstat (limited to 'usr.sbin/tcpdump')
-rw-r--r--usr.sbin/tcpdump/print-ike.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/usr.sbin/tcpdump/print-ike.c b/usr.sbin/tcpdump/print-ike.c
index 16844d52437..215772d155b 100644
--- a/usr.sbin/tcpdump/print-ike.c
+++ b/usr.sbin/tcpdump/print-ike.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: print-ike.c,v 1.13 2002/06/11 18:15:48 ho Exp $ */
+/* $OpenBSD: print-ike.c,v 1.14 2002/07/11 16:14:52 stevesk Exp $ */
/*
* Copyright (c) 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999
@@ -29,7 +29,7 @@
#ifndef lint
static const char rcsid[] =
- "@(#) $Header: /cvs/OpenBSD/src/usr.sbin/tcpdump/print-ike.c,v 1.13 2002/06/11 18:15:48 ho Exp $ (XXX)";
+ "@(#) $Header: /cvs/OpenBSD/src/usr.sbin/tcpdump/print-ike.c,v 1.14 2002/07/11 16:14:52 stevesk Exp $ (XXX)";
#endif
#include <sys/param.h>
@@ -423,7 +423,7 @@ ipsec_id_print (u_char *buf, int len, u_char doi)
case IPSEC_ID_FQDN:
case IPSEC_ID_USER_FQDN:
printf("\"");
- for(p = buf + 4; (int)(p - buf) < len; p++)
+ for(p = buf + 4; (int)(p - buf) < len - 4; p++)
printf("%c",(isprint(*p) ? *p : '.'));
printf("\"");
break;