mirror of
https://git.kernel.org/pub/scm/network/wireless/iwd.git
synced 2024-12-23 14:22:36 +01:00
ie: Fix Supported Rates length check
Supported Rates IEs can be 1-8 bytes, not only 8 byte long, according to 802.11-2012 8.4.2.3.
This commit is contained in:
parent
38b5f3fee4
commit
b344d27c56
2
src/ie.c
2
src/ie.c
@ -1325,7 +1325,7 @@ int ie_parse_supported_rates(struct ie_tlv_iter *iter,
|
|||||||
len = ie_tlv_iter_get_length(iter);
|
len = ie_tlv_iter_get_length(iter);
|
||||||
|
|
||||||
if (ie_tlv_iter_get_tag(iter) == IE_TYPE_SUPPORTED_RATES &&
|
if (ie_tlv_iter_get_tag(iter) == IE_TYPE_SUPPORTED_RATES &&
|
||||||
len != 8)
|
(len == 0 || len > 8))
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
|
||||||
rates = ie_tlv_iter_get_data(iter);
|
rates = ie_tlv_iter_get_data(iter);
|
||||||
|
Loading…
Reference in New Issue
Block a user