qcacmn: Check param_buf->hal_reg_caps before dereferencing it
While handling the WMI_SERVICE_READY_EXT_EVENTID WMI FW event, a NULL pointer dereference can occur if param_buf->hal_reg_caps is not checked. Check param_buf->hal_reg_caps before dereferencing it to avoid NULL pointer dereference. Change-Id: I00eba5e89fbdde78979d19f492df5ad4dca8b80c CRs-Fixed: 2347673
This commit is contained in:
@@ -9379,6 +9379,9 @@ static QDF_STATUS extract_reg_cap_service_ready_ext_tlv(
|
||||
if (phy_idx >= reg_caps->num_phy)
|
||||
return QDF_STATUS_E_INVAL;
|
||||
|
||||
if (!param_buf->hal_reg_caps)
|
||||
return QDF_STATUS_E_INVAL;
|
||||
|
||||
ext_reg_cap = ¶m_buf->hal_reg_caps[phy_idx];
|
||||
|
||||
param->phy_id = ext_reg_cap->phy_id;
|
||||
|
Referens i nytt ärende
Block a user