X-Git-Url: https://git.tcpdump.org/tcpdump/blobdiff_plain/ed85e20e4d6a27d5405f37366dd34b64c10a9211..refs/pull/433/head:/print-lmp.c diff --git a/print-lmp.c b/print-lmp.c index 27649977..8d68e858 100644 --- a/print-lmp.c +++ b/print-lmp.c @@ -406,8 +406,7 @@ lmp_print(netdissect_options *ndo, while(tlen>0) { /* did we capture enough for fully decoding the object header ? */ - if (!ND_TTEST2(*tptr, sizeof(struct lmp_object_header))) - goto trunc; + ND_TCHECK2(*tptr, sizeof(struct lmp_object_header)); lmp_obj_header = (const struct lmp_object_header *)tptr; lmp_obj_len=EXTRACT_16BITS(lmp_obj_header->length); @@ -432,8 +431,7 @@ lmp_print(netdissect_options *ndo, obj_tlen=lmp_obj_len-sizeof(struct lmp_object_header); /* did we capture enough for fully decoding the object ? */ - if (!ND_TTEST2(*tptr, lmp_obj_len)) - goto trunc; + ND_TCHECK2(*tptr, lmp_obj_len); hexdump=FALSE; switch(lmp_obj_header->class_num) {