Simplify VHT Operation element parsing
Check the element length in the parser and remove the length field from struct ieee802_11_elems since the element is of fixed length. Signed-off-by: Jouni Malinen <j@w1.fi>
This commit is contained in:
parent
d6fefd64d2
commit
f4b64c603e
2 changed files with 2 additions and 2 deletions
|
@ -292,8 +292,9 @@ ParseRes ieee802_11_parse_elems(const u8 *start, size_t len,
|
||||||
elems->vht_capabilities = pos;
|
elems->vht_capabilities = pos;
|
||||||
break;
|
break;
|
||||||
case WLAN_EID_VHT_OPERATION:
|
case WLAN_EID_VHT_OPERATION:
|
||||||
|
if (elen < sizeof(struct ieee80211_vht_operation))
|
||||||
|
break;
|
||||||
elems->vht_operation = pos;
|
elems->vht_operation = pos;
|
||||||
elems->vht_operation_len = elen;
|
|
||||||
break;
|
break;
|
||||||
case WLAN_EID_VHT_OPERATING_MODE_NOTIFICATION:
|
case WLAN_EID_VHT_OPERATING_MODE_NOTIFICATION:
|
||||||
if (elen != 1)
|
if (elen != 1)
|
||||||
|
|
|
@ -64,7 +64,6 @@ struct ieee802_11_elems {
|
||||||
u8 mesh_config_len;
|
u8 mesh_config_len;
|
||||||
u8 mesh_id_len;
|
u8 mesh_id_len;
|
||||||
u8 peer_mgmt_len;
|
u8 peer_mgmt_len;
|
||||||
u8 vht_operation_len;
|
|
||||||
u8 vendor_ht_cap_len;
|
u8 vendor_ht_cap_len;
|
||||||
u8 vendor_vht_len;
|
u8 vendor_vht_len;
|
||||||
u8 p2p_len;
|
u8 p2p_len;
|
||||||
|
|
Loading…
Reference in a new issue