From 845bd47cf7f1c097ad18d05de93c755a97ca0419 Mon Sep 17 00:00:00 2001 From: Vignesh Viswanathan Date: Mon, 11 Jun 2018 18:45:45 +0530 Subject: [PATCH] qcacld-3.0: Fix length while copying of WAPI akmsuite from supplicant IEs As per WAPI spec, the akmsuite if of length 4 x akm suite count. This was changed as part of I63528da4c2dfafa22f2c6fc73afe52727af02b64 and causes WAPI connection failure due to mismatch in scan results. Fix the correct length while copying akmsuite from supplicant IEs in wlan_hdd_cfg80211_set_ie. Change-Id: Ib0d60e82a3fbaef1a9405200dd03eb7882007fcb CRs-Fixed: 2258136 --- core/hdd/src/wlan_hdd_cfg80211.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/core/hdd/src/wlan_hdd_cfg80211.c b/core/hdd/src/wlan_hdd_cfg80211.c index 630ef1300674..387f854cb33d 100644 --- a/core/hdd/src/wlan_hdd_cfg80211.c +++ b/core/hdd/src/wlan_hdd_cfg80211.c @@ -19046,7 +19046,8 @@ static int wlan_hdd_cfg80211_set_ie(struct hdd_adapter *adapter, /* AKM suite list, each OUI contains 4 bytes */ akmlist = (uint32_t *)(tmp); if (akmsuiteCount <= MAX_NUM_AKM_SUITES) { - memcpy(akmsuite, akmlist, akmsuiteCount); + qdf_mem_copy(akmsuite, akmlist, + sizeof(uint32_t) * akmsuiteCount); } else { hdd_err("Invalid akmSuite count: %u", akmsuiteCount);