]> The Tcpdump Group git mirrors - tcpdump/commitdiff
More EXTRACT_U_1() replacing direct dereferences.
authorGuy Harris <[email protected]>
Sat, 9 Dec 2017 01:46:02 +0000 (17:46 -0800)
committerGuy Harris <[email protected]>
Sat, 9 Dec 2017 01:46:02 +0000 (17:46 -0800)
print-ldp.c

index 1131fe55c47533536ef35cb469c2fc82659c0e82..4e71ade4402303d36553c15c4558c5f609faa556 100644 (file)
@@ -335,7 +335,7 @@ ldp_tlv_print(netdissect_options *ndo,
 
     case LDP_TLV_FEC:
         TLV_TCHECK(1);
-        fec_type = *tptr;
+        fec_type = EXTRACT_U_1(tptr);
        ND_PRINT((ndo, "\n\t      %s FEC (0x%02x)",
               tok2str(ldp_fec_values, "Unknown", fec_type),
               fec_type));
@@ -421,7 +421,7 @@ ldp_tlv_print(netdissect_options *ndo,
             TLV_TCHECK(vc_info_len);
 
             while (vc_info_len > 2) {
-                vc_info_tlv_type = *tptr;
+                vc_info_tlv_type = EXTRACT_U_1(tptr);
                 vc_info_tlv_len = EXTRACT_U_1(tptr + 1);
                 if (vc_info_tlv_len < 2)
                     break;