]> The Tcpdump Group git mirrors - tcpdump/commitdiff
DNS: Use GET_U_1() to replace a direct dereference
authorFrancois-Xavier Le Bail <[email protected]>
Mon, 10 Aug 2020 15:46:09 +0000 (17:46 +0200)
committerFrancois-Xavier Le Bail <[email protected]>
Mon, 10 Aug 2020 15:46:09 +0000 (17:46 +0200)
print-domain.c

index 1486b5d121333abe8c26cde7856e4312d1e0f513..4523d67f4aebb7e6b9a1d3cf33ac8b504b7ab924 100644 (file)
@@ -928,7 +928,7 @@ domain_print(netdissect_options *ndo,
                if (cp + 1 > ndo->ndo_snapend)
                        goto print;
                if (type == T_OPT) {
-                       rcode |= (*cp << 4);
+                       rcode |= (GET_U_1(cp) << 4);
                        goto print;
                }
                cp += 4;