From 4353e4f1565feaa88905de27cf9081efd0849d52 Mon Sep 17 00:00:00 2001 From: Varun Reddy Yeturu Date: Tue, 3 Oct 2017 18:22:42 -0700 Subject: [PATCH] qcacld-3.0: Check for valid vdev ID in SWBA event handler After deriving the vdev_id from the vdev map in wma_beacon_swba_handler check for the validity of the vdev_id Change-Id: Ifc4577d8a00f447e2bcfa4e01fce5ac2dbe96a4d CRs-Fixed: 2120751 --- core/wma/src/wma_mgmt.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/core/wma/src/wma_mgmt.c b/core/wma/src/wma_mgmt.c index 4aced7748855..a978520a6156 100644 --- a/core/wma/src/wma_mgmt.c +++ b/core/wma/src/wma_mgmt.c @@ -272,7 +272,9 @@ int wma_beacon_swba_handler(void *handle, uint8_t *event, uint32_t len) return -EINVAL; } - for (; vdev_map; vdev_id++, vdev_map >>= 1) { + WMA_LOGD("vdev_map = %d", vdev_map); + for (; vdev_map && vdev_id < wma->max_bssid; + vdev_id++, vdev_map >>= 1) { if (!(vdev_map & 0x1)) continue; if (!cdp_cfg_is_high_latency(soc,