qcacld-3.0: Fix null pointer dereference in wma_pdev_div_info_evt_handler

pmac->sme.get_chain_rssi_cb is never checked if
WMI_PDEV_DIV_RSSI_ANTID_EVENTID messages is sent anytime
by user.

pmac->sme.get_chain_rssi_cb can not be appropriately
registered and can result in NULL pointer dereference.

Change-Id: I64783a0e2d054b45678f126b42de20470d3264d3
CRs-Fixed: 2324128
This commit is contained in:
Harprit Chhabada 2018-10-04 18:28:28 -07:00 • committed by nshrivas
commit 2e2aa6962c

View file

@ -5806,6 +5806,10 @@ int wma_pdev_div_info_evt_handler(void *handle, u_int8_t *event_buf,
return -EINVAL;
}
if (!pmac->sme.get_chain_rssi_cb) {
WMA_LOGE(FL("Invalid get_chain_rssi_cb"));
return -EINVAL;
}
param_buf = (WMI_PDEV_DIV_RSSI_ANTID_EVENTID_param_tlvs *) event_buf;
if (!param_buf) {
WMA_LOGE(FL("Invalid rssi antid event buffer"));