qcacmn: Fix null pointer dereference in wifi_pos_oem_rsp_handler()

Add validation code to make sure wifi_pos_send_rsp
function pointer is not null.

Change-Id: I6761f5065b1a49855afac2691523c41bcf383b2b
CRs-Fixed: 2329346
This commit is contained in:
Arif Hussain
2018-10-08 13:58:46 -07:00
committed by nshrivas
parent d95bfa449c
commit 738581ae50

View File

@@ -581,6 +581,11 @@ int wifi_pos_oem_rsp_handler(struct wlan_objmgr_psoc *psoc,
return -EINVAL;
}
if (!wifi_pos_send_rsp) {
wifi_pos_err("invalid response handler");
return -EINVAL;
}
wifi_pos_debug("oem data rsp, len: %d to pid: %d", len, app_pid);
if (oem_rsp->rsp_len_2 + oem_rsp->dma_len) {