Using ND_TTEST_LEN() makes the check a bit more stringent.
Using ND_BYTES_BETWEEN() casts the difference to a u_int, so it's 1)
unsigned and 2) not 64-bit on LP64 or LLP64 platforms.
default:
if (ndo->ndo_vflag <= 1) {
- if (pptr < ndo->ndo_snapend)
- print_unknown_data(ndo, pptr, "\n\t ", (int)(ndo->ndo_snapend - pptr));
+ if (ND_TTEST_LEN(pptr, 1))
+ print_unknown_data(ndo, pptr, "\n\t ", ND_BYTES_AVAILABLE_AFTER(pptr));
}
return;
}