]> git.karo-electronics.de Git - linux-beck.git/commitdiff
mac80211: avoid using uninitialized stack data
authorJes Sorensen <Jes.Sorensen@redhat.com>
Wed, 10 Dec 2014 19:14:07 +0000 (14:14 -0500)
committerJohannes Berg <johannes.berg@intel.com>
Fri, 12 Dec 2014 11:00:46 +0000 (12:00 +0100)
Avoid a case where we would access uninitialized stack data if the AP
advertises HT support without 40MHz channel support.

Cc: stable@vger.kernel.org
Fixes: f3000e1b43f1 ("mac80211: fix broken use of VHT/20Mhz with some APs")
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
net/mac80211/mlme.c

index 75a9bf50207ecd6cdf5ac41cae7101d03ac58a11..2c36c4765f47f28c42d1b2112b59a764ba4ed82f 100644 (file)
@@ -174,6 +174,7 @@ ieee80211_determine_chantype(struct ieee80211_sub_if_data *sdata,
        if (!(ht_cap->cap_info &
              cpu_to_le16(IEEE80211_HT_CAP_SUP_WIDTH_20_40))) {
                ret = IEEE80211_STA_DISABLE_40MHZ;
+               vht_chandef = *chandef;
                goto out;
        }