소스 검색

qcacld-3.0: Check range for pcl_count in policy_mgr_trim_acs_channel_list

In policy_mgr_trim_acs_channel_list(), check the range for
pcl to ensure it is less than QDF_MAX_NUM_CHAN

Change-Id: I1326e229e93edef6ac5963c7cc48557cc22e76ba
CRs-Fixed: 2424007
Harprit Chhabada 6 년 전
부모
커밋
74007cf168
1개의 변경된 파일6개의 추가작업 그리고 0개의 파일을 삭제
  1. 6 0
      components/cmn_services/policy_mgr/src/wlan_policy_mgr_get_set_utils.c

+ 6 - 0
components/cmn_services/policy_mgr/src/wlan_policy_mgr_get_set_utils.c

@@ -3324,6 +3324,12 @@ void policy_mgr_trim_acs_channel_list(uint8_t *pcl, uint8_t pcl_count,
 		return;
 	}
 
+	if (pcl_count >= QDF_MAX_NUM_CHAN) {
+		policy_mgr_err("pcl_count is too big %d",
+			       pcl_count);
+		return;
+	}
+
 	policy_mgr_debug("Update ACS channels with PCL");
 	for (j = 0; j < *org_ch_list_count; j++)
 		for (i = 0; i < pcl_count; i++)