- if (!TTEST2(*tptr, 4))
- goto trunc;
-
- type = EXTRACT_16BITS(tptr);
- len = EXTRACT_16BITS(tptr+2);
-
- /* infinite loop check */
- if (type == 0 || len == 0) {
+ ND_TCHECK_4(tptr);
+ type = GET_BE_U_2(tptr);
+ len = GET_BE_U_2(tptr + 2);
+ /* XXX: should not be but sometimes it is, see the test captures */
+ if (type == 0)