mirror of
https://github.com/the-tcpdump-group/tcpdump.git
synced 2024-11-27 20:14:12 +08:00
IEEE 802.11: Add a bounds check
This commit is contained in:
parent
662cec9566
commit
3f1c4af001
@ -2045,6 +2045,10 @@ ieee802_11_print(netdissect_options *ndo,
|
|||||||
hdrlen = roundup2(hdrlen, 4);
|
hdrlen = roundup2(hdrlen, 4);
|
||||||
if (ndo->ndo_Hflag && FC_TYPE(fc) == T_DATA &&
|
if (ndo->ndo_Hflag && FC_TYPE(fc) == T_DATA &&
|
||||||
DATA_FRAME_IS_QOS(FC_SUBTYPE(fc))) {
|
DATA_FRAME_IS_QOS(FC_SUBTYPE(fc))) {
|
||||||
|
if(!ND_TTEST_1(p + hdrlen)) {
|
||||||
|
nd_print_trunc(ndo);
|
||||||
|
return hdrlen;
|
||||||
|
}
|
||||||
meshdrlen = extract_mesh_header_length(p+hdrlen);
|
meshdrlen = extract_mesh_header_length(p+hdrlen);
|
||||||
hdrlen += meshdrlen;
|
hdrlen += meshdrlen;
|
||||||
} else
|
} else
|
||||||
|
Loading…
Reference in New Issue
Block a user