diff options
author | Jo-Philipp Wich <jo@mein.io> | 2023-12-14 12:51:06 +0100 |
---|---|---|
committer | Jo-Philipp Wich <jo@mein.io> | 2023-12-14 12:51:06 +0100 |
commit | 5c8fd34bac42edc5d85e532d7babea7112c98471 (patch) | |
tree | 2cf5f4f0cecf0d67fda371818b81a00bbed0800e | |
parent | 7e5830edfb38dcbb1834b0e44604636ad48d13c5 (diff) |
nl80211: fix parsing of NL80211_BAND_ATTR_VHT_MCS_SET attribute
The length constraint of 16 byte was incorrect, the attribute is 8 bytes
long; two bytes for the RX MCS set, two bytes for the highest RX rate,
two bytes for the TX MCS set and two bytes for the highest TX rate.
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
-rw-r--r-- | lib/nl80211.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/nl80211.c b/lib/nl80211.c index c4ea3fa..03d1600 100644 --- a/lib/nl80211.c +++ b/lib/nl80211.c @@ -1288,7 +1288,7 @@ uc_nl_convert_rta_vht_mcs(const uc_nl_attr_spec_t *spec, struct nl_msg *msg, str uint16_t u16; uint8_t *mcs; - if (!nla_check_len(tb[spec->attr], 16)) + if (!nla_check_len(tb[spec->attr], 8)) return NULL; mcs = nla_data(tb[spec->attr]); |