]> The Tcpdump Group git mirrors - tcpdump/blobdiff - print-radius.c
Use more the EXTRACT_U_1() macro (43/n)
[tcpdump] / print-radius.c
index fe7bde9228439e57d549cb55b02d6633875e422c..5ce68d163cd8bff63cb80dd3c14e6754f73de602 100644 (file)
@@ -907,7 +907,7 @@ print_attr_netmask6(netdissect_options *ndo,
        return;
    }
    ND_TCHECK2(data[0], length);
-   if (data[1] > 128)
+   if (EXTRACT_U_1(data + 1) > 128)
    {
       ND_PRINT((ndo, "ERROR: netmask %u not in range (0..128)", EXTRACT_U_1(data + 1)));
       return;
@@ -919,7 +919,7 @@ print_attr_netmask6(netdissect_options *ndo,
 
    ND_PRINT((ndo, "%s/%u", ip6addr_string(ndo, data2), EXTRACT_U_1(data + 1)));
 
-   if (data[1] > 8 * (length - 2))
+   if (EXTRACT_U_1(data + 1) > 8 * (length - 2))
       ND_PRINT((ndo, " (inconsistent prefix length)"));
 
    return;