X-Git-Url: https://git.tcpdump.org/tcpdump/blobdiff_plain/3018f3698b1463d4577ea8b412f079f4381b7605..69f03c1c03b280b9c5863bfb47e8847d59b4ee6b:/print-domain.c diff --git a/print-domain.c b/print-domain.c index d98cd11c..dcbd982c 100644 --- a/print-domain.c +++ b/print-domain.c @@ -839,6 +839,10 @@ ns_rprint(netdissect_options *ndo, case T_URI: if (!ND_TTEST_LEN(cp, len)) return(NULL); + if (len < 4) { + ND_PRINT(" len %u is too short (< 4)", len); + break; + } ND_PRINT(" %u %u ", GET_BE_U_2(cp), GET_BE_U_2(cp + 2)); if (nd_printn(ndo, cp + 4, len - 4, ndo->ndo_snapend)) return(NULL);