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 */