]> The Tcpdump Group git mirrors - tcpdump/commitdiff
NTP: Use GET_U_1() to replace a direct dereference
authorFrancois-Xavier Le Bail <[email protected]>
Mon, 30 Sep 2024 18:03:40 +0000 (20:03 +0200)
committerFrancois-Xavier Le Bail <[email protected]>
Mon, 30 Sep 2024 18:23:34 +0000 (20:23 +0200)
print-ntp.c

index a927e7bef8ee73a575f743f6c7a0bbfa1ab10b02..69d7709c6cb75012be77ef6041f958d0ee7effc4 100644 (file)
@@ -277,7 +277,7 @@ ntp_time_print(netdissect_options *ndo,
                 * modified or extended in the future, and unregistered kiss
                 * codes are possible (and are being seen in the field).
                 */
-               if (!ND_ASCII_ISPRINT((bp->refid)[0])) {
+               if (!ND_ASCII_ISPRINT(GET_U_1(bp->refid))) {
                        ND_PRINT("(unspec)");
                        ND_TCHECK_4(bp->refid);
                } else {