]> The Tcpdump Group git mirrors - tcpdump/blobdiff - print-ospf.c
(for 4.9.3) CVE-2018-14880/OSPFv3: Fix a bounds check
[tcpdump] / print-ospf.c
index db4231ba0f85eec030c4fca34682cf4719c396dd..4c09912a98193125f392284d2a2fd2ff1789e25c 100644 (file)
@@ -706,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",
@@ -723,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",