X-Git-Url: https://git.tcpdump.org/tcpdump/blobdiff_plain/1a90fd99d279d63242419a30ba3e0720872bff75..d7b497cac78b6e22a66a6bae9bdec60a8044f67a:/print-icmp6.c diff --git a/print-icmp6.c b/print-icmp6.c index 10ec6bee..761b3779 100644 --- a/print-icmp6.c +++ b/print-icmp6.c @@ -1322,7 +1322,7 @@ icmp6_opt_print(netdissect_options *ndo, const u_char *bp, int resid) ND_PRINT((ndo," lifetime %us, domain(s):", EXTRACT_BE_U_4(&opds->nd_opt_dnssl_lifetime))); domp = cp + 8; /* domain names, variable-sized, RFC1035-encoded */ - while (domp < cp + (op->nd_opt_len << 3) && *domp != '\0') + while (domp < cp + (op->nd_opt_len << 3) && EXTRACT_U_1(domp) != '\0') { ND_PRINT((ndo, " ")); if ((domp = ns_nprint (ndo, domp, bp)) == NULL) @@ -1350,7 +1350,7 @@ icmp6_opt_print(netdissect_options *ndo, const u_char *bp, int resid) case 1: break; case 2: - ND_TCHECK2(*in6p, 8); + ND_TCHECK_8(in6p); memcpy(&in6, opri + 1, 8); break; case 3: @@ -1544,7 +1544,7 @@ dnsname_print(netdissect_options *ndo, const u_char *cp, const u_char *ep) break; } while (i-- && cp < ep) { - safeputchar(ndo, *cp); + safeputchar(ndo, EXTRACT_U_1(cp)); cp++; } if (cp + 1 < ep && EXTRACT_U_1(cp)) @@ -1666,7 +1666,7 @@ icmp6_nodeinfo_print(netdissect_options *ndo, u_int icmp6len, const u_char *bp, cp++; ND_PRINT((ndo,", \"")); while (cp < ep) { - safeputchar(ndo, *cp); + safeputchar(ndo, EXTRACT_U_1(cp)); cp++; } ND_PRINT((ndo,"\"")); @@ -1764,7 +1764,7 @@ icmp6_nodeinfo_print(netdissect_options *ndo, u_int icmp6len, const u_char *bp, cp++; ND_PRINT((ndo,", \"")); while (cp < ep) { - safeputchar(ndo, *cp); + safeputchar(ndo, EXTRACT_U_1(cp)); cp++; } ND_PRINT((ndo,"\""));