]> The Tcpdump Group git mirrors - tcpdump/blobdiff - print-pim.c
Not all systems have "sa_family_t"; use "u_int8_t" instead.
[tcpdump] / print-pim.c
index e6b451137c4829291e02bd6586b560b6254e73f7..f19607e10993a091525fc270ae25b2d01a56b1a2 100644 (file)
  * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
  */
 
+#ifndef lint
+static const char rcsid[] _U_ =
+    "@(#) $Header: /tcpdump/master/tcpdump/print-pim.c,v 1.37.2.4 2004-03-24 02:52:37 guy Exp $ (LBL)";
+#endif
 
 #ifdef HAVE_CONFIG_H
 #include "config.h"
@@ -53,10 +57,6 @@ struct pim {
 #include "addrtoname.h"
 #include "extract.h"
 
-#ifndef lint
-static const char rcsid[] _U_ =
-    "@(#) $Header: /tcpdump/master/tcpdump/print-pim.c,v 1.37.2.1 2003-11-15 22:29:02 guy Exp $ (LBL)";
-#endif
 #include "ip.h"
 
 static void pimv2_print(register const u_char *bp, register u_int len);
@@ -113,6 +113,7 @@ pimv1_join_prune_print(register const u_char *bp, register u_int len)
        while (ngroups--) {
                TCHECK2(bp[0], 4);
                (void)printf("\n\tGroup: %s", ipaddr_string(bp));
+               TCHECK2(bp[4], 4);
                if (EXTRACT_32BITS(&bp[4]) != 0xffffffff)
                        (void)printf("/%s", ipaddr_string(&bp[4]));
                TCHECK2(bp[8], 4);
@@ -154,6 +155,7 @@ pimv1_print(register const u_char *bp, register u_int len)
        if (bp >= ep)
                return;
 
+       TCHECK(bp[1]);
        type = bp[1];
 
        switch (type) {