qcacld-2.0: Add vdev sanity check in action frame handler
Add vdev sanity check before accessing the wma
interface structure as part of the action
frame evt handling.
Change-Id: I19998b56f5932df92e2ab8b73bc17d9c60f33ed6
CRs-Fixed: 2161148
diff --git a/CORE/SERVICES/WMA/wma.c b/CORE/SERVICES/WMA/wma.c
index c870f02..f70f272 100644
--- a/CORE/SERVICES/WMA/wma.c
+++ b/CORE/SERVICES/WMA/wma.c
@@ -9281,7 +9281,10 @@
WMA_LOGA(FL("Invalid fixed param"));
return -EINVAL;
}
-
+ if (event->vdev_id >= wma_handle->max_bssid) {
+ WMA_LOGA(FL("Invalid vdev id"));
+ return -EINVAL;
+ }
intr = &wma_handle->interfaces[event->vdev_id];
/* command is in progess */
if(!intr->action_frame_filter) {