qcacld-3.0: Prevent memory issue with more check

Add session_id range check etc

Change-Id: I749076a5f060873702b42ac4908e3220e805c349
CRs-Fixed: 2061117
This commit is contained in:
Zhu Jianmin 2017-06-22 09:39:36 +08:00 • committed by snandini
commit ded9d2dc57
2 changed files with 7 additions and 3 deletions

View file

@ -7011,8 +7011,8 @@ int wlan_hdd_cfg80211_update_apies(hdd_adapter_t *adapter)
proberesp_ies = qdf_mem_malloc(beacon->proberesp_ies_len +
MAX_GENIE_LEN);
if (proberesp_ies == NULL) {
hdd_err("mem alloc failed for probe resp ies %d",
proberesp_ies_len);
hdd_err("mem alloc failed for probe resp ies, size: %d",
beacon->proberesp_ies_len + MAX_GENIE_LEN);
ret = -EINVAL;
goto done;
}

View file

@ -2641,7 +2641,11 @@ static void hdd_ipa_uc_offload_enable_disable(hdd_adapter_t *adapter,
"Interface context is NULL");
return;
}
if (session_id >= CSR_ROAM_SESSION_MAX) {
HDD_IPA_LOG(QDF_TRACE_LEVEL_ERROR,
"invalid session id: %d", session_id);
return;
}
if (enable == hdd_ipa->vdev_offload_enabled[session_id]) {
/* IPA offload status is already set as desired */
HDD_IPA_LOG(QDF_TRACE_LEVEL_ERROR,