]> The Tcpdump Group git mirrors - tcpdump/blobdiff - print-ospf.c
Remove libpcap-layer issues from tests/pktap-heap-overflow.pcap.
[tcpdump] / print-ospf.c
index 0e84e584dee7eca56201d9c9e8bb5b9e55a2e4d0..4c09912a98193125f392284d2a2fd2ff1789e25c 100644 (file)
@@ -21,6 +21,8 @@
  * OSPF support contributed by Jeffrey Honig ([email protected])
  */
 
+/* \summary: Open Shortest Path First (OSPF) printer */
+
 #ifdef HAVE_CONFIG_H
 #include "config.h"
 #endif
@@ -704,7 +706,7 @@ ospf_print_lsa(netdissect_options *ndo,
                while ((const u_char *)lp < ls_end) {
                        register uint32_t ul;
 
-                       ND_TCHECK(*lp);
+                       ND_TCHECK_32BITS(lp);
                        ul = EXTRACT_32BITS(lp);
                         topology = (ul & SLA_MASK_TOS) >> SLA_SHIFT_TOS;
                        ND_PRINT((ndo, "\n\t\ttopology %s (%u) metric %d",
@@ -721,7 +723,7 @@ ospf_print_lsa(netdissect_options *ndo,
                while ((const u_char *)lp < ls_end) {
                        register uint32_t ul;
 
-                       ND_TCHECK(*lp);
+                       ND_TCHECK_32BITS(lp);
                        ul = EXTRACT_32BITS(lp);
                         topology = (ul & SLA_MASK_TOS) >> SLA_SHIFT_TOS;
                        ND_PRINT((ndo, "\n\t\ttopology %s (%u) metric %d",
@@ -994,6 +996,7 @@ ospf_decode_v2(netdissect_options *ndo,
                break;
 
        case OSPF_TYPE_HELLO:
+               ND_TCHECK(op->ospf_hello.hello_options);
                ND_PRINT((ndo, "\n\tOptions [%s]",
                          bittok2str(ospf_option_values,"none",op->ospf_hello.hello_options)));