diff options
-rw-r--r-- | print-cdp.c | 12 | ||||
-rw-r--r-- | print-icmp6.c | 3 | ||||
-rw-r--r-- | print-krb.c | 6 | ||||
-rw-r--r-- | print-l2tp.c | 6 | ||||
-rw-r--r-- | print-mptcp.c | 6 | ||||
-rw-r--r-- | print-ppp.c | 3 | ||||
-rw-r--r-- | smbutil.c | 6 |
7 files changed, 28 insertions, 14 deletions
diff --git a/print-cdp.c b/print-cdp.c index 37db394d..586a5ec8 100644 --- a/print-cdp.c +++ b/print-cdp.c @@ -342,8 +342,10 @@ cdp_print_addr(netdissect_options *ndo, if (p + pl > endp) goto trunc; ND_PRINT((ndo, "pt=0x%02x, pl=%d, pb=", EXTRACT_8BITS((p - 2)), pl)); - while (pl-- > 0) - ND_PRINT((ndo, " %02x", *p++)); + while (pl-- > 0) { + ND_PRINT((ndo, " %02x", EXTRACT_8BITS(p))); + p++; + } ND_TCHECK2(*p, 2); if (p + 2 > endp) goto trunc; @@ -352,8 +354,10 @@ cdp_print_addr(netdissect_options *ndo, ND_TCHECK2(*p, al); if (p + al > endp) goto trunc; - while (al-- > 0) - ND_PRINT((ndo, " %02x", *p++)); + while (al-- > 0) { + ND_PRINT((ndo, " %02x", EXTRACT_8BITS(p))); + p++; + } } num--; if (num) diff --git a/print-icmp6.c b/print-icmp6.c index 4a8c9d51..bd920faf 100644 --- a/print-icmp6.c +++ b/print-icmp6.c @@ -617,7 +617,8 @@ print_lladdr(netdissect_options *ndo, const uint8_t *p, size_t l) while (l > 0 && q < ep) { if (q > p) ND_PRINT((ndo,":")); - ND_PRINT((ndo,"%02x", *q++)); + ND_PRINT((ndo,"%02x", EXTRACT_8BITS(q))); + q++; l--; } } diff --git a/print-krb.c b/print-krb.c index 5dc895fd..ef6a83b2 100644 --- a/print-krb.c +++ b/print-krb.c @@ -203,10 +203,12 @@ krb4_print(netdissect_options *ndo, case AUTH_MSG_APPL_REQUEST: cp += 2; ND_TCHECK(*cp); - ND_PRINT((ndo, "v%d ", *cp++)); + ND_PRINT((ndo, "v%d ", EXTRACT_8BITS(cp))); + cp++; PRINT; ND_TCHECK(*cp); - ND_PRINT((ndo, " (%d)", *cp++)); + ND_PRINT((ndo, " (%d)", EXTRACT_8BITS(cp))); + cp++; ND_TCHECK(*cp); ND_PRINT((ndo, " (%d)", *cp)); break; diff --git a/print-l2tp.c b/print-l2tp.c index 6682d71a..782c0fea 100644 --- a/print-l2tp.c +++ b/print-l2tp.c @@ -268,7 +268,8 @@ print_string(netdissect_options *ndo, const u_char *dat, u_int length) { u_int i; for (i=0; i<length; i++) { - ND_PRINT((ndo, "%c", *dat++)); + ND_PRINT((ndo, "%c", EXTRACT_8BITS(dat))); + dat++; } } @@ -277,7 +278,8 @@ print_octets(netdissect_options *ndo, const u_char *dat, u_int length) { u_int i; for (i=0; i<length; i++) { - ND_PRINT((ndo, "%02x", *dat++)); + ND_PRINT((ndo, "%02x", EXTRACT_8BITS(dat))); + dat++; } } diff --git a/print-mptcp.c b/print-mptcp.c index 6e7154e6..8cca477e 100644 --- a/print-mptcp.c +++ b/print-mptcp.c @@ -367,8 +367,10 @@ remove_addr_print(netdissect_options *ndo, opt_len -= 3; ND_PRINT((ndo, " id")); - while (opt_len--) - ND_PRINT((ndo, " %u", *addr_id++)); + while (opt_len--) { + ND_PRINT((ndo, " %u", EXTRACT_8BITS(addr_id))); + addr_id++; + } return 1; } diff --git a/print-ppp.c b/print-ppp.c index 163de1df..0a8a9649 100644 --- a/print-ppp.c +++ b/print-ppp.c @@ -883,7 +883,8 @@ handle_chap(netdissect_options *ndo, ND_PRINT((ndo, ", Value ")); for (i = 0; i < val_size; i++) { ND_TCHECK(*p); - ND_PRINT((ndo, "%02x", *p++)); + ND_PRINT((ndo, "%02x", EXTRACT_8BITS(p))); + p++; } name_size = len - (p - p0); ND_PRINT((ndo, ", Name ")); @@ -685,8 +685,10 @@ smb_fdata1(netdissect_options *ndo, { int l = atoi(fmt + 1); ND_TCHECK2(*buf, l); - while (l--) - ND_PRINT((ndo, "%02x", *buf++)); + while (l--) { + ND_PRINT((ndo, "%02x", EXTRACT_8BITS(buf))); + buf++; + } fmt++; while (isdigit((unsigned char)*fmt)) fmt++; |