瀏覽代碼

qcacld-3.0: Check if rs_results->total_num_tx_power_levels is allocated

Check if rs_results->total_num_tx_power_levels is allocated, before
checking the OOB in wma_unified_radio_tx_power_level_stats_event_handler
for new fixed_param->total_num_tx_power_levels

Change-Id: I3e3caf295fad568ecc8e294e6224356ea8a84da6
CRs-Fixed: 2333042
Harprit Chhabada 6 年之前
父節點
當前提交
b034fb35fe
共有 1 個文件被更改,包括 2 次插入1 次删除
  1. 2 1
      core/wma/src/wma_utils.c

+ 2 - 1
core/wma/src/wma_utils.c

@@ -1516,7 +1516,8 @@ static int wma_unified_radio_tx_power_level_stats_event_handler(void *handle,
 							 fixed_param->radio_id;
 	tx_power_level_values = (uint8_t *) param_tlvs->tx_time_per_power_level;
 
-	if (fixed_param->total_num_tx_power_levels >
+	if (rs_results->total_num_tx_power_levels &&
+	    fixed_param->total_num_tx_power_levels >
 		rs_results->total_num_tx_power_levels) {
 		WMA_LOGE("%s: excess tx_power buffers:%d, total_num_tx_power_levels:%d",
 			 __func__, fixed_param->total_num_tx_power_levels,