qcacld-3.0: memset reject_ap_info properly before usage
Currently, reject_ap_info is used at many places and memset is not done before filling it. memset the buffer to avoid reading garbage values. Also, modify the current initialization of ap_info in cm_add_bssid_to_reject_list to memset. Change-Id: Ic0fabc1733c4ea63dccb2e45b2a2dc37791e594d CRs-Fixed: 3040299
This commit is contained in:
@@ -141,6 +141,7 @@ cm_fw_roam_sync_start_ind(struct wlan_objmgr_vdev *vdev,
|
||||
if (IS_ROAM_REASON_STA_KICKOUT(roam_reason)) {
|
||||
struct reject_ap_info ap_info;
|
||||
|
||||
qdf_mem_zero(&ap_info, sizeof(struct reject_ap_info));
|
||||
ap_info.bssid = connected_bssid;
|
||||
ap_info.reject_ap_type = DRIVER_AVOID_TYPE;
|
||||
ap_info.reject_reason = REASON_STA_KICKOUT;
|
||||
@@ -1068,6 +1069,7 @@ static QDF_STATUS cm_handle_ho_fail(struct scheduler_msg *msg)
|
||||
cm_sm_deliver_event(vdev, WLAN_CM_SM_EV_ROAM_HO_FAIL,
|
||||
sizeof(wlan_cm_id), &cm_id);
|
||||
|
||||
qdf_mem_zero(&ap_info, sizeof(struct reject_ap_info));
|
||||
ap_info.bssid = ind->bssid;
|
||||
ap_info.reject_ap_type = DRIVER_AVOID_TYPE;
|
||||
ap_info.reject_reason = REASON_ROAM_HO_FAILURE;
|
||||
|
@@ -2445,7 +2445,9 @@ static void
|
||||
cm_add_bssid_to_reject_list(struct wlan_objmgr_pdev *pdev,
|
||||
struct sir_rssi_disallow_lst *entry)
|
||||
{
|
||||
struct reject_ap_info ap_info = {0};
|
||||
struct reject_ap_info ap_info;
|
||||
|
||||
qdf_mem_zero(&ap_info, sizeof(struct reject_ap_info));
|
||||
|
||||
ap_info.bssid = entry->bssid;
|
||||
ap_info.reject_ap_type = DRIVER_RSSI_REJECT_TYPE;
|
||||
|
Reference in New Issue
Block a user