X-Git-Url: https://git.tcpdump.org/tcpdump/blobdiff_plain/43e3207195ce42830c1efbe051d4ab32994c0006..refs/heads/tcpdump-4.9:/print-802_11.c diff --git a/print-802_11.c b/print-802_11.c index 22337a40..50a3e9f5 100644 --- a/print-802_11.c +++ b/print-802_11.c @@ -2058,6 +2058,10 @@ ieee802_11_print(netdissect_options *ndo, hdrlen = roundup2(hdrlen, 4); if (ndo->ndo_Hflag && FC_TYPE(fc) == T_DATA && DATA_FRAME_IS_QOS(FC_SUBTYPE(fc))) { + if (caplen < hdrlen + 1) { + ND_PRINT((ndo, "%s", tstr)); + return hdrlen; + } meshdrlen = extract_mesh_header_length(p+hdrlen); hdrlen += meshdrlen; } else @@ -3071,7 +3075,7 @@ print_in_radiotap_namespace(netdissect_options *ndo, return 0; } -static u_int +u_int ieee802_11_radio_print(netdissect_options *ndo, const u_char *p, u_int length, u_int caplen) {