X-Git-Url: https://git.tcpdump.org/tcpdump/blobdiff_plain/39c8c55aa9ff84244cf558b9a957b78933babf0a..1a04b92e365f5ed01ca38619b41bcc4fc9cbd63c:/print-l2tp.c diff --git a/print-l2tp.c b/print-l2tp.c index 7feab704..eb92833b 100644 --- a/print-l2tp.c +++ b/print-l2tp.c @@ -396,7 +396,7 @@ l2tp_q931_cc_print(netdissect_options *ndo, const u_char *dat, u_int length) return; } print_16bits_val(ndo, (const uint16_t *)dat); - ND_PRINT((ndo, ", %02x", dat[2])); + ND_PRINT((ndo, ", %02x", EXTRACT_U_1(dat + 2))); dat += 3; length -= 3; if (length != 0) { @@ -619,7 +619,7 @@ l2tp_avp_print(netdissect_options *ndo, const u_char *dat, int length) /* If it goes past the end of the remaining length of the captured data, we'll give up. */ - ND_TCHECK2(*ptr, len); + ND_TCHECK_LEN(ptr, len); /* * After this point, we don't need to check whether we go past