diff options
| author | Abhinav Kumar <abhikuma@codeaurora.org> | 2018-02-28 17:21:38 +0530 |
|---|---|---|
| committer | Abhinav Kumar <abhikuma@codeaurora.org> | 2018-02-28 18:12:13 +0530 |
| commit | f4c34d7d184f04965e5fa9a4417653dae186e8ce (patch) | |
| tree | 8b4533a8cffe336e427d9ad641bf3cc1eb56fa62 | |
| parent | 71eddf47d19d4a6537a884a39e63e784dc471093 (diff) | |
qcacld-2.0: Fix check for num_ac in iface stats event handler
In function wma_unified_link_iface_stats_event_handler, num_ac
is received from the firmware and is used in the loop to populate
values into result. However the memory for result is allocated
for WIFI_AC_MAX (which is 4). While copying the data from fw, the
fw loop is looped from i = 0 to i < num_ac which is 0 to 3.
So the value of num_ac = 4 from the fw is not an issue.
Modify the upper limit check for num_ac to be greater than
WIFI_AC_MAX instead of greater than equal to WIFI_AC_MAX.
Change-Id: Iefb71563e4608e6fe3ab300bf7a9a96f748c7853
CRs-Fixed: 2197481
| -rw-r--r-- | CORE/SERVICES/WMA/wma.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/CORE/SERVICES/WMA/wma.c b/CORE/SERVICES/WMA/wma.c index 414e69e50428..3252d3d4e7d9 100644 --- a/CORE/SERVICES/WMA/wma.c +++ b/CORE/SERVICES/WMA/wma.c @@ -4969,7 +4969,7 @@ static int wma_unified_link_iface_stats_event_handler(void *handle, WMA_LOGA("%s: Invalid param_tlvs for Iface Stats", __func__); return -EINVAL; } - if (link_stats->num_ac >= WIFI_AC_MAX) { + if (link_stats->num_ac > WIFI_AC_MAX) { WMA_LOGE("%s: Excess data received from firmware num_ac %d", __func__, link_stats->num_ac); return -EINVAL; |
