summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorgaurank kathpalia <gkathpal@codeaurora.org>2017-10-03 18:13:49 +0530
committersnandini <snandini@codeaurora.org>2017-10-30 03:52:20 -0700
commit3ad152dfed1a6110da02e7e3f5bbe352fef2ea16 (patch)
tree2c2969cae3edff1f96cb8fbf61f04bc64835a6ea
parent1f00488549f8ab70bc81b86aea10b97cf92f43c8 (diff)
qcacld-2.0: Check for valid vdev ID in wma_nlo_match_evt_handler
Check if the firmware is passing a valid vdev ID or not in the NLO match event and return error if vdev is invalid Change-Id: I83f957ae084e17c20f607eb3862a131f3b311d23 CRs-Fixed: 2132377
-rw-r--r--CORE/SERVICES/WMA/wma.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/CORE/SERVICES/WMA/wma.c b/CORE/SERVICES/WMA/wma.c
index 48e166df558d..fc0e6db36f12 100644
--- a/CORE/SERVICES/WMA/wma.c
+++ b/CORE/SERVICES/WMA/wma.c
@@ -34860,6 +34860,11 @@ static int wma_nlo_match_evt_handler(void *handle, u_int8_t *event,
nlo_event = param_buf->fixed_param;
WMA_LOGD("PNO match event received for vdev %d",
nlo_event->vdev_id);
+ if (nlo_event->vdev_id >= wma->max_bssid) {
+ WMA_LOGE("Invalid vdev id in the NLO event %d",
+ nlo_event->vdev_id);
+ return -EINVAL;
+ }
node = &wma->interfaces[nlo_event->vdev_id];
if (node)