diff options
author | David S. Miller <davem@davemloft.net> | 2011-09-27 22:42:30 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2011-09-27 22:42:30 -0400 |
commit | b582ad8e961c78458005250ae28fdd7a25db55aa (patch) | |
tree | 11b5d0d97cbdf20c9ddc83ddb7e126c457406164 /net | |
parent | 67928c4041606f02725f3c95c4c0404e4532df1b (diff) | |
parent | a8acfd82ebefbb32f12f413019e53f9e939cf44e (diff) | |
download | linux-stable-b582ad8e961c78458005250ae28fdd7a25db55aa.tar.gz linux-stable-b582ad8e961c78458005250ae28fdd7a25db55aa.tar.bz2 linux-stable-b582ad8e961c78458005250ae28fdd7a25db55aa.zip |
Merge branch 'for-davem' of git://git.infradead.org/users/linville/wireless
Diffstat (limited to 'net')
-rw-r--r-- | net/wireless/nl80211.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c index e83e7fee3bc0..ea40d540a990 100644 --- a/net/wireless/nl80211.c +++ b/net/wireless/nl80211.c @@ -4113,9 +4113,12 @@ static int nl80211_crypto_settings(struct cfg80211_registered_device *rdev, if (len % sizeof(u32)) return -EINVAL; + if (settings->n_akm_suites > NL80211_MAX_NR_AKM_SUITES) + return -EINVAL; + memcpy(settings->akm_suites, data, len); - for (i = 0; i < settings->n_ciphers_pairwise; i++) + for (i = 0; i < settings->n_akm_suites; i++) if (!nl80211_valid_akm_suite(settings->akm_suites[i])) return -EINVAL; } |