MAX_MCS_INDEX is a valid array index.

The arrays have MAX_MCS_INDEX+1 entries; valid indices to from 0 to
MAX_MCX_INDEX.

Change-Id: Ib8b939e687a00505cab5e5f9b3b6dce34e9d0b47
Reviewed-on: https://code.wireshark.org/review/13803
Reviewed-by: Guy Harris <guy@alum.mit.edu>
This commit is contained in:
Guy Harris 2016-02-07 11:32:22 -08:00
parent 31cecd60f5
commit 949c84f46d
1 changed files with 1 additions and 1 deletions

View File

@ -439,7 +439,7 @@ dissect_wlan_radio (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree, void
bandwidth_40 =
(info_n->bandwidth == PHDR_802_11_BANDWIDTH_40_MHZ) ?
1 : 0;
if (info_n->mcs_index < MAX_MCS_INDEX) {
if (info_n->mcs_index <= MAX_MCS_INDEX) {
data_rate = ieee80211_htrate(info_n->mcs_index, bandwidth_40, info_n->short_gi);
have_data_rate = TRUE;
}