X-Git-Url: https://git.tcpdump.org/tcpdump/blobdiff_plain/e32c6dba38bc28d74f55e0d28745c25f6ecb7527..a63600a1fc28dbc7ae7ce9f996829c49a25fb33c:/print-ap1394.c diff --git a/print-ap1394.c b/print-ap1394.c index 8e6454dd..b1988f27 100644 --- a/print-ap1394.c +++ b/print-ap1394.c @@ -27,6 +27,7 @@ #include "netdissect-stdinc.h" +#define ND_LONGJMP_FROM_TCHECK #include "netdissect.h" #include "extract.h" #include "addrtoname.h" @@ -95,11 +96,7 @@ ap1394_if_print(netdissect_options *ndo, const struct pcap_pkthdr *h, const u_ch struct lladdr_info src, dst; ndo->ndo_protocol = "ap1394"; - if (caplen < FIREWIRE_HDRLEN) { - ndo->ndo_ll_hdr_len += caplen; - nd_print_trunc(ndo); - return; - } + ND_TCHECK_LEN(p, FIREWIRE_HDRLEN); ndo->ndo_ll_hdr_len += FIREWIRE_HDRLEN; if (ndo->ndo_eflag) @@ -123,6 +120,4 @@ ap1394_if_print(netdissect_options *ndo, const struct pcap_pkthdr *h, const u_ch if (!ndo->ndo_suppress_default_print) ND_DEFAULTPRINT(p, caplen); } - - return; }