Snap for 9121707 from 4c7892059f1722aff75111627dcdb49ece7e52a1 to tm-d3-release

Change-Id: I8fca4fce62ed4a90a00e30aed216450fc73fc153
diff --git a/service/uci/jni/UwbEventManager.cpp b/service/uci/jni/UwbEventManager.cpp
index e670f7a..487769f 100755
--- a/service/uci/jni/UwbEventManager.cpp
+++ b/service/uci/jni/UwbEventManager.cpp
@@ -291,6 +291,12 @@
     return;
   }
 
+  if (multicast_list_ntf->no_of_controlees > MAX_NUM_CONTROLLEES) {
+    JNI_TRACE_E("%s: no Of Controlees %d exceeded max allowed: %d ", fn,
+                multicast_list_ntf->no_of_controlees, MAX_NUM_CONTROLLEES);
+    return;
+  }
+
   jintArray controleeMacAddressArray =
       env->NewIntArray(multicast_list_ntf->no_of_controlees);
   jlongArray subSessionIdArray =