aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-ieee80211-radio.c
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2016-07-13 20:13:22 -0700
committerGuy Harris <guy@alum.mit.edu>2016-07-14 03:13:56 +0000
commit2c0d11716bac5807e35d97686c6d7d9293d2795e (patch)
tree7504498a5eb291800578f497d5a19754923285ab /epan/dissectors/packet-ieee80211-radio.c
parent335b2c023347ee8bd380440f7165d86831ab20c7 (diff)
Fix VHT valid checks.
The valid array in a struct mcs_vht_valid is indexed by the bandwidth and the NSS-1; use the NSS-1, not the NSS, as the index. The maximum possible value of the NSS is MAX_VHT_NSS, so allow a value of MAX_VHT_NSS. Change-Id: I49585f217f3e70356c1dd1ba32b6c714ce202236 Reviewed-on: https://code.wireshark.org/review/16426 Reviewed-by: Guy Harris <guy@alum.mit.edu>
Diffstat (limited to 'epan/dissectors/packet-ieee80211-radio.c')
-rw-r--r--epan/dissectors/packet-ieee80211-radio.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/epan/dissectors/packet-ieee80211-radio.c b/epan/dissectors/packet-ieee80211-radio.c
index adb6e4ef1a..25a2b33067 100644
--- a/epan/dissectors/packet-ieee80211-radio.c
+++ b/epan/dissectors/packet-ieee80211-radio.c
@@ -633,8 +633,8 @@ dissect_wlan_radio_phdr (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree,
* If we can calculate the data rate for this user, do so.
*/
if (can_calculate_rate && info_ac->mcs[i] <= MAX_MCS_VHT_INDEX &&
- info_ac->nss[i] < MAX_VHT_NSS &&
- ieee80211_vhtvalid[info_ac->mcs[i]].valid[bandwidth][info_ac->nss[i]]) {
+ info_ac->nss[i] <= MAX_VHT_NSS &&
+ ieee80211_vhtvalid[info_ac->mcs[i]].valid[bandwidth][info_ac->nss[i]-1]) {
data_rate = ieee80211_vhtrate(info_ac->mcs[i], bandwidth, info_ac->short_gi) * info_ac->nss[i];
if (data_rate != 0.0f) {
proto_tree_add_float_format_value(user_tree, hf_wlan_radio_data_rate, tvb, 0, 0,