X-Git-Url: https://git.tcpdump.org/tcpdump/blobdiff_plain/6288c273b66fa124b58af66026151fff1d5931c2..a63600a1fc28dbc7ae7ce9f996829c49a25fb33c:/print-symantec.c?ds=sidebyside diff --git a/print-symantec.c b/print-symantec.c index 8fe0c79f..0d394e30 100644 --- a/print-symantec.c +++ b/print-symantec.c @@ -27,6 +27,7 @@ #include "netdissect-stdinc.h" +#define ND_LONGJMP_FROM_TCHECK #include "netdissect.h" #include "extract.h" #include "ethertype.h" @@ -78,11 +79,7 @@ symantec_if_print(netdissect_options *ndo, const struct pcap_pkthdr *h, const u_ u_short ether_type; ndo->ndo_protocol = "symantec"; - if (caplen < sizeof (struct symantec_header)) { - ndo->ndo_ll_hdr_len += caplen; - nd_print_trunc(ndo); - return; - } + ND_TCHECK_LEN(p, sizeof(struct symantec_header)); ndo->ndo_ll_hdr_len += sizeof (struct symantec_header); if (ndo->ndo_eflag)