qcacmn: Add sanity check for wifi_pos priv obj in wifi_pos_main.c
Add sanity check before pointer dereferenced in wifi_pos_main.c Change-Id: Iaea0c56f0684e2cfc959153b09468811a16ef22e CRs-Fixed: 2370311
这个提交包含在:
@@ -166,6 +166,11 @@ static QDF_STATUS wifi_pos_process_set_cap_req(struct wlan_objmgr_psoc *psoc,
|
||||
struct wifi_pos_user_defined_caps *caps =
|
||||
(struct wifi_pos_user_defined_caps *)req->buf;
|
||||
|
||||
if (!wifi_pos_obj) {
|
||||
wifi_pos_err("wifi_pos priv obj is null");
|
||||
return QDF_STATUS_E_INVAL;
|
||||
}
|
||||
|
||||
wifi_pos_debug("Received set cap req pid(%d), len(%d)",
|
||||
req->pid, req->buf_len);
|
||||
|
||||
@@ -187,6 +192,11 @@ static QDF_STATUS wifi_pos_process_get_cap_req(struct wlan_objmgr_psoc *psoc,
|
||||
struct wifi_pos_psoc_priv_obj *wifi_pos_obj =
|
||||
wifi_pos_get_psoc_priv_obj(psoc);
|
||||
|
||||
if (!wifi_pos_obj) {
|
||||
wifi_pos_err("wifi_pos priv obj is null");
|
||||
return QDF_STATUS_E_INVAL;
|
||||
}
|
||||
|
||||
wifi_pos_debug("Received get cap req pid(%d), len(%d)",
|
||||
req->pid, req->buf_len);
|
||||
|
||||
@@ -284,6 +294,11 @@ static QDF_STATUS wifi_pos_process_ch_info_req(struct wlan_objmgr_psoc *psoc,
|
||||
struct wifi_pos_psoc_priv_obj *wifi_pos_obj =
|
||||
wifi_pos_get_psoc_priv_obj(psoc);
|
||||
|
||||
if (!wifi_pos_obj) {
|
||||
wifi_pos_err("wifi_pos priv obj is null");
|
||||
return QDF_STATUS_E_INVAL;
|
||||
}
|
||||
|
||||
wifi_pos_debug("Received ch info req pid(%d), len(%d)",
|
||||
req->pid, req->buf_len);
|
||||
|
||||
@@ -368,6 +383,11 @@ static QDF_STATUS wifi_pos_process_app_reg_req(struct wlan_objmgr_psoc *psoc,
|
||||
struct wifi_pos_psoc_priv_obj *wifi_pos_obj =
|
||||
wifi_pos_get_psoc_priv_obj(psoc);
|
||||
|
||||
if (!wifi_pos_obj) {
|
||||
wifi_pos_err("wifi_pos priv obj is null");
|
||||
return QDF_STATUS_E_INVAL;
|
||||
}
|
||||
|
||||
wifi_pos_err("Received App Req Req pid(%d), len(%d)",
|
||||
req->pid, req->buf_len);
|
||||
|
||||
|
在新工单中引用
屏蔽一个用户