aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
Diffstat (limited to 'net')
-rw-r--r--net/wireless/nl80211.c5
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,
4113 if (len % sizeof(u32)) 4113 if (len % sizeof(u32))
4114 return -EINVAL; 4114 return -EINVAL;
4115 4115
4116 if (settings->n_akm_suites > NL80211_MAX_NR_AKM_SUITES)
4117 return -EINVAL;
4118
4116 memcpy(settings->akm_suites, data, len); 4119 memcpy(settings->akm_suites, data, len);
4117 4120
4118 for (i = 0; i < settings->n_ciphers_pairwise; i++) 4121 for (i = 0; i < settings->n_akm_suites; i++)
4119 if (!nl80211_valid_akm_suite(settings->akm_suites[i])) 4122 if (!nl80211_valid_akm_suite(settings->akm_suites[i]))
4120 return -EINVAL; 4123 return -EINVAL;
4121 } 4124 }