- ND_PRINT((ndo, ",seq=0x%x", EXTRACT_32BITS(ah + 1)));
- if (bp + sizeof(struct ah) + sumlen > ep)
- ND_PRINT((ndo, "[truncated]"));
+ ND_TCHECK_4(ah + 1);
+ ND_PRINT((ndo, ",seq=0x%x", EXTRACT_BE_U_4(ah + 1)));
+ if (!ND_TTEST_LEN(bp, sizeof(struct ah) + sumlen)) {
+ ND_PRINT((ndo, "[truncated]):"));
+ return -1;
+ }