]> The Tcpdump Group git mirrors - tcpdump/blobdiff - print-icmp.c
add tracefiles for infinite loop testing
[tcpdump] / print-icmp.c
index 4e69dfed42e84fcabb8e117172926db540e54e89..a8e21b0ac28826cd6af687ede14cd6d67aa88158 100644 (file)
  * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
  */
 
+#ifndef lint
+static const char rcsid[] _U_ =
+    "@(#) $Header: /tcpdump/master/tcpdump/print-icmp.c,v 1.73.2.3 2004-03-24 00:56:34 guy Exp $ (LBL)";
+#endif
 
 #ifdef HAVE_CONFIG_H
 #include "config.h"
 #include "addrtoname.h"
 #include "extract.h"                   /* must come after interface.h */
 
-#ifndef lint
-static const char rcsid[] _U_ =
-    "@(#) $Header: /tcpdump/master/tcpdump/print-icmp.c,v 1.73.2.1 2003-11-15 22:28:51 guy Exp $ (LBL)";
-#endif
 #include "ip.h"
 #include "udp.h"
 #include "ipproto.h"
@@ -305,6 +305,7 @@ icmp_print(const u_char *bp, u_int plen, const u_char *bp2, int fragmented)
                        oip = &dp->icmp_ip;
                        hlen = IP_HL(oip) * 4;
                        ouh = (struct udphdr *)(((u_char *)oip) + hlen);
+                       TCHECK(ouh->uh_dport);
                        dport = EXTRACT_16BITS(&ouh->uh_dport);
                        switch (oip->ip_p) {