Fix the max array size for the sensor callback 68/256968/1
authorDoHyun Pyun <dh79.pyun@samsung.com>
Thu, 15 Apr 2021 22:55:12 +0000 (07:55 +0900)
committerDoHyun Pyun <dh79.pyun@samsung.com>
Thu, 15 Apr 2021 22:55:12 +0000 (07:55 +0900)
Change-Id: Id55fcc582641b8d4289c90f954b9d376ceee36f9
Signed-off-by: DoHyun Pyun <dh79.pyun@samsung.com>
include/user-awareness-private.h
src/user-awareness-device.c

index bc63751dc3e3996988cc7f9d8530a1150de01942..48ce444a11af696a2e2082f75d4045c87eb19cc5 100755 (executable)
@@ -171,6 +171,8 @@ do  { \
 } while (0)
 
 
+#define UA_SENSOR_NUM_MAX 100
+
 #define UA_ALL_SENSOR_PRESENCE_DETECTION_WAIT_TIME 65 /**< All sensor presence detection wait time */
 
 /**
index 275543853247c22d3635cdf0e3c7ca09b1033afa..a2c6880316268816e07e4dd035b64bf7f8493425 100755 (executable)
@@ -24,7 +24,7 @@
 #include <user-awareness-util.h>
 
 static GSList *ua_devices_list = NULL;
-static ua_callback_s user_callbacks[UA_USER_EVENT_MAX][UA_SENSOR_MAX] = {{{NULL, NULL, 0},},};
+static ua_callback_s user_callbacks[UA_USER_EVENT_MAX][UA_SENSOR_NUM_MAX] = {{{NULL, NULL, 0},},};
 
 static void __ua_remove_device_info_from_list(uam_device_info_s *uam_info)
 {