diff options
author | Stuart Henderson <sthen@cvs.openbsd.org> | 2009-05-25 10:53:36 +0000 |
---|---|---|
committer | Stuart Henderson <sthen@cvs.openbsd.org> | 2009-05-25 10:53:36 +0000 |
commit | ce539ea343056dedf5337fa5e29ea5fa1214475e (patch) | |
tree | 502b2f24ee83da8b4c229d72630cd0deac2625eb /usr.sbin/tcpdump/print-icmp6.c | |
parent | 6c0a9d0e6299d04e2837561eb2f64bcd88adf314 (diff) |
add a missing check for truncated dport in the returned UDP header for
ICMP_UNREACH_PORT. from Peter J. Philipp, ok jsing@. Closes system/6149.
Diffstat (limited to 'usr.sbin/tcpdump/print-icmp6.c')
-rw-r--r-- | usr.sbin/tcpdump/print-icmp6.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/usr.sbin/tcpdump/print-icmp6.c b/usr.sbin/tcpdump/print-icmp6.c index 3bceab29ffa..941dad30951 100644 --- a/usr.sbin/tcpdump/print-icmp6.c +++ b/usr.sbin/tcpdump/print-icmp6.c @@ -1,4 +1,4 @@ -/* $OpenBSD: print-icmp6.c,v 1.5 2009/01/29 09:46:32 bluhm Exp $ */ +/* $OpenBSD: print-icmp6.c,v 1.6 2009/05/25 10:53:35 sthen Exp $ */ /* * Copyright (c) 1988, 1989, 1990, 1991, 1993, 1994 @@ -125,6 +125,7 @@ icmp6_print(register const u_char *bp, register const u_char *bp2) TCHECK(oip->ip6_nxt); hlen = sizeof(struct ip6_hdr); ouh = (struct udphdr *)(((u_char *)oip) + hlen); + TCHECK(ouh->uh_dport); dport = ntohs(ouh->uh_dport); switch (oip->ip6_nxt) { case IPPROTO_TCP: |