summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArif Hussain <arifhussain@codeaurora.org>2018-09-14 16:52:24 -0700
committerLes Lee <lesl@google.com>2019-07-04 09:36:09 +0000
commit5891b00885f87ec30c4682d9fc83c07ee2003877 (patch)
treebfa6882b6d311eea3b12c1eb523ef4175dfe54ac
parentb0ef98dff22c353d1f451dc9dcb53cb1b067c10e (diff)
downloadqcacld-5891b00885f87ec30c4682d9fc83c07ee2003877.tar.gz
In wma_unified_radio_tx_mem_free() function, results buffer array may be dereferenced with large index value, that may result OOB memory access. Fix the same by correcting incrementing pointer to results buffer. Change-Id: I57a26dba9db32758c7d7fd51b99d3364a8020a9d CRs-Fixed: 2308644 Bug: 136197213 Signed-off-by: Srinivas Girigowda <quic_sgirigow@quicinc.com>
-rw-r--r--core/wma/src/wma_utils.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/core/wma/src/wma_utils.c b/core/wma/src/wma_utils.c
index 02eea17fa6..7bfd3a4c5a 100644
--- a/core/wma/src/wma_utils.c
+++ b/core/wma/src/wma_utils.c
@@ -1437,7 +1437,6 @@ int wma_unified_radio_tx_mem_free(void *handle)
rs_results = (tSirWifiRadioStat *)
&wma_handle->link_stats_results->results[0];
for (i = 0; i < wma_handle->link_stats_results->num_radio; i++) {
- rs_results += i;
if (rs_results->tx_time_per_power_level) {
qdf_mem_free(rs_results->tx_time_per_power_level);
rs_results->tx_time_per_power_level = NULL;
@@ -1447,6 +1446,7 @@ int wma_unified_radio_tx_mem_free(void *handle)
qdf_mem_free(rs_results->channels);
rs_results->channels = NULL;
}
+ rs_results++;
}
qdf_mem_free(wma_handle->link_stats_results);