qcacld-3.0: Avoid possible NULL pointer dereference
In target_if_get_roam_vendor_control_param_event_handler, there are 2 possible NULL pointer dereference issues: 1. Host calls target_if_get_psoc_from_scn_hdl API to get psoc object. But as per current logic even if psoc is NULL, psoc is dereferenced by passing it as an argument to get_wmi_unified_hdl_from_psoc. 2. Host calls get_wmi_unified_hdl_from_psoc API to get wmi_handle pointer. But as per current logic even if wmi_handle is NULL, wmi_handle is dereferenced by passing is as an argument 1 to function wmi_extract_roam_vendor_control_param_event. Fix is to update the sanity check logic for psoc and wmi_handle pointers to avoid possible NULL pointer dereference. Change-Id: I3c3df062b538b05218e729d7bf6806e221073269 CRs-Fixed: 3242435
This commit is contained in:

committed by
Madan Koyyalamudi

parent
645dab45ba
commit
f66512e051
@@ -662,13 +662,13 @@ int target_if_get_roam_vendor_control_param_event_handler(ol_scn_t scn,
|
||||
psoc = target_if_get_psoc_from_scn_hdl(scn);
|
||||
if (!psoc) {
|
||||
target_if_err("psoc is null");
|
||||
ret = -EINVAL;
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
wmi_handle = get_wmi_unified_hdl_from_psoc(psoc);
|
||||
if (!wmi_handle) {
|
||||
target_if_err("wmi_handle is null");
|
||||
ret = -EINVAL;
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
qdf_status = wmi_extract_roam_vendor_control_param_event(wmi_handle,
|
||||
|
Reference in New Issue
Block a user