Avoid accessing past the end of an array.
authoreapache <eapache@f5534014-38df-0310-8fa8-9805f1628bb7>
Tue, 24 Dec 2013 14:34:06 +0000 (14:34 +0000)
committereapache <eapache@f5534014-38df-0310-8fa8-9805f1628bb7>
Tue, 24 Dec 2013 14:34:06 +0000 (14:34 +0000)
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@54441 f5534014-38df-0310-8fa8-9805f1628bb7

epan/dissectors/packet-ieee80211-radiotap.c

index 7cae8f111c437a5197bebff05f7b7b5d55f021bf..a422aa1e29db8c7b07db495acd0fb7045cd14538 100644 (file)
@@ -1887,7 +1887,7 @@ dissect_radiotap(tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree)
                                                        tvb, offset + 8, 1,ENC_LITTLE_ENDIAN);
                                        }
 
-                                       if (can_calculate_rate) {
+                                       if (can_calculate_rate && mcs <= MAX_MCS_INDEX) {
                                                float rate = ieee80211_vhtinfo[mcs].rates[bandwidth][gi_length] * nss;
                                                if (rate != 0.0f && user_tree) {
                                                        rate_ti = proto_tree_add_float_format(user_tree,