From 20f09e4c84e9ac509fabcf152e2426389f6149db Mon Sep 17 00:00:00 2001 From: Ashish Kumar Dhanotiya Date: Fri, 4 Aug 2017 17:59:38 +0530 Subject: [PATCH] qcacld-3.0: Fix regression in wlan_hdd_add_hostapd_conf_vsie api Currently In wlan_hdd_add_hostapd_conf_vsie api after checking the length of element, return is being done because of which it is skipping the remaining elements. To fix this issue, don't return after invalid length, instead process the remaining elements. Change-Id: I1b370bc30a4400aa4fd5fce5783741272c64386a CRs-Fixed: 2087787 --- core/hdd/src/wlan_hdd_hostapd.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/core/hdd/src/wlan_hdd_hostapd.c b/core/hdd/src/wlan_hdd_hostapd.c index fd8519550bc7..580e0598e69f 100644 --- a/core/hdd/src/wlan_hdd_hostapd.c +++ b/core/hdd/src/wlan_hdd_hostapd.c @@ -6717,12 +6717,13 @@ static void wlan_hdd_add_hostapd_conf_vsie(hdd_adapter_t *pHostapdAdapter, elem_id = ptr[0]; elem_len = ptr[1]; left -= 2; - if (elem_len > left || elem_len < WPS_OUI_TYPE_SIZE) { + if (elem_len > left) { hdd_err("**Invalid IEs eid: %d elem_len: %d left: %d**", elem_id, elem_len, left); return; } - if (IE_EID_VENDOR == elem_id) { + if (IE_EID_VENDOR == elem_id && + (elem_len >= WPS_OUI_TYPE_SIZE)) { /* skipping the VSIE's which we don't want to include or * it will be included by existing code */