diff options
Diffstat (limited to 'print-ahcp.c')
-rw-r--r-- | print-ahcp.c | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/print-ahcp.c b/print-ahcp.c index efe684a0..8d784c14 100644 --- a/print-ahcp.c +++ b/print-ahcp.c @@ -118,7 +118,7 @@ ahcp_time_print(netdissect_options *ndo, const u_char *cp, const u_char *ep) invalid: ND_PRINT((ndo, "%s", istr)); - ND_TCHECK2(*cp, ep - cp); + ND_TCHECK_LEN(cp, ep - cp); return 0; trunc: ND_PRINT((ndo, "%s", tstr)); @@ -136,7 +136,7 @@ ahcp_seconds_print(netdissect_options *ndo, const u_char *cp, const u_char *ep) invalid: ND_PRINT((ndo, "%s", istr)); - ND_TCHECK2(*cp, ep - cp); + ND_TCHECK_LEN(cp, ep - cp); return 0; trunc: ND_PRINT((ndo, "%s", tstr)); @@ -160,7 +160,7 @@ ahcp_ipv6_addresses_print(netdissect_options *ndo, const u_char *cp, const u_cha invalid: ND_PRINT((ndo, "%s", istr)); - ND_TCHECK2(*cp, ep - cp); + ND_TCHECK_LEN(cp, ep - cp); return 0; trunc: ND_PRINT((ndo, "%s", tstr)); @@ -184,7 +184,7 @@ ahcp_ipv4_addresses_print(netdissect_options *ndo, const u_char *cp, const u_cha invalid: ND_PRINT((ndo, "%s", istr)); - ND_TCHECK2(*cp, ep - cp); + ND_TCHECK_LEN(cp, ep - cp); return 0; trunc: ND_PRINT((ndo, "%s", tstr)); @@ -199,7 +199,7 @@ ahcp_ipv6_prefixes_print(netdissect_options *ndo, const u_char *cp, const u_char while (cp < ep) { if (cp + 17 > ep) goto invalid; - ND_TCHECK2(*cp, 17); + ND_TCHECK_LEN(cp, 17); ND_PRINT((ndo, "%s%s/%u", sep, ip6addr_string(ndo, cp), EXTRACT_U_1(cp + 16))); cp += 17; sep = ", "; @@ -208,7 +208,7 @@ ahcp_ipv6_prefixes_print(netdissect_options *ndo, const u_char *cp, const u_char invalid: ND_PRINT((ndo, "%s", istr)); - ND_TCHECK2(*cp, ep - cp); + ND_TCHECK_LEN(cp, ep - cp); return 0; trunc: ND_PRINT((ndo, "%s", tstr)); @@ -232,7 +232,7 @@ ahcp_ipv4_prefixes_print(netdissect_options *ndo, const u_char *cp, const u_char invalid: ND_PRINT((ndo, "%s", istr)); - ND_TCHECK2(*cp, ep - cp); + ND_TCHECK_LEN(cp, ep - cp); return 0; trunc: ND_PRINT((ndo, "%s", tstr)); @@ -285,7 +285,7 @@ ahcp1_options_print(netdissect_options *ndo, const u_char *cp, const u_char *ep) break; /* truncated and already marked up */ } else { ND_PRINT((ndo, " (Length %u)", option_len)); - ND_TCHECK2(*cp, option_len); + ND_TCHECK_LEN(cp, option_len); } cp += option_len; } @@ -293,7 +293,7 @@ ahcp1_options_print(netdissect_options *ndo, const u_char *cp, const u_char *ep) invalid: ND_PRINT((ndo, "%s", istr)); - ND_TCHECK2(*cp, ep - cp); + ND_TCHECK_LEN(cp, ep - cp); return; trunc: ND_PRINT((ndo, "%s", tstr)); @@ -333,12 +333,12 @@ ahcp1_body_print(netdissect_options *ndo, const u_char *cp, const u_char *ep) if (ndo->ndo_vflag >= 2) ahcp1_options_print(ndo, cp, cp + body_len); /* not ep (ignore extra data) */ else - ND_TCHECK2(*cp, body_len); + ND_TCHECK_LEN(cp, body_len); return; invalid: ND_PRINT((ndo, "%s", istr)); - ND_TCHECK2(*cp, ep - cp); + ND_TCHECK_LEN(cp, ep - cp); return; trunc: ND_PRINT((ndo, "%s", tstr)); @@ -368,7 +368,7 @@ ahcp_print(netdissect_options *ndo, const u_char *cp, const u_int len) if (len < AHCP1_HEADER_FIX_LEN) goto invalid; if (!ndo->ndo_vflag) { - ND_TCHECK2(*cp, AHCP1_HEADER_FIX_LEN - 2); + ND_TCHECK_LEN(cp, AHCP1_HEADER_FIX_LEN - 2); cp += AHCP1_HEADER_FIX_LEN - 2; } else { /* Hopcount */ @@ -404,7 +404,7 @@ ahcp_print(netdissect_options *ndo, const u_char *cp, const u_int len) invalid: ND_PRINT((ndo, "%s", istr)); - ND_TCHECK2(*cp, ep - cp); + ND_TCHECK_LEN(cp, ep - cp); return; trunc: ND_PRINT((ndo, "%s", tstr)); |