summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYunjin Lee <yunjin-.lee@samsung.com>2020-04-27 14:31:01 +0900
committerYunjin Lee <yunjin-.lee@samsung.com>2020-04-27 14:39:18 +0900
commit37f734da9613a5c308b28c42e2c534ea3378ee06 (patch)
tree39a329d0b2ebd499e9108e30989bed6874b77500
parentd35d90f5b3fe0af5f0cf16ecb31c1a1de4a714ac (diff)
downloadprivacy-setting-37f734da9613a5c308b28c42e2c534ea3378ee06.tar.gz
privacy-setting-37f734da9613a5c308b28c42e2c534ea3378ee06.tar.bz2
privacy-setting-37f734da9613a5c308b28c42e2c534ea3378ee06.zip
Fix app event handler size
- Wrong event handler size can cause stack smashing Change-Id: Ie051e7dfec9d464cabb6a3c1678dc9ad97638329 Signed-off-by: Yunjin Lee <yunjin-.lee@samsung.com>
-rw-r--r--ui-popup/src/app_main.c4
-rw-r--r--ui/src/main_privacy_setting.c4
2 files changed, 4 insertions, 4 deletions
diff --git a/ui-popup/src/app_main.c b/ui-popup/src/app_main.c
index 85c1cdf..4fc68fc 100644
--- a/ui-popup/src/app_main.c
+++ b/ui-popup/src/app_main.c
@@ -220,9 +220,9 @@ int main(int argc, char *argv[])
memset(&ad, 0x0, sizeof(papp_data_s));
ui_app_lifecycle_callback_s event_callback = {0, };
- app_event_handler_h handlers[2] = {NULL, };
+ app_event_handler_h handler = NULL;
- ui_app_add_event_handler(&handlers[APP_EVENT_LANGUAGE_CHANGED], APP_EVENT_LANGUAGE_CHANGED, ui_app_lang_changed, &ad);
+ ui_app_add_event_handler(&handler, APP_EVENT_LANGUAGE_CHANGED, ui_app_lang_changed, &ad);
event_callback.create = app_create;
event_callback.terminate = app_terminate;
diff --git a/ui/src/main_privacy_setting.c b/ui/src/main_privacy_setting.c
index 78cb2ac..6d6e6fc 100644
--- a/ui/src/main_privacy_setting.c
+++ b/ui/src/main_privacy_setting.c
@@ -134,9 +134,9 @@ int main(int argc, char *argv[])
memset(&ad, 0x0, sizeof(app_data_s));
ui_app_lifecycle_callback_s event_callback = {0, };
- app_event_handler_h handlers[2] = {NULL, };
+ app_event_handler_h handler = NULL;
- ui_app_add_event_handler(&handlers[APP_EVENT_LANGUAGE_CHANGED], APP_EVENT_LANGUAGE_CHANGED, ui_app_lang_changed, &ad);
+ ui_app_add_event_handler(&handler, APP_EVENT_LANGUAGE_CHANGED, ui_app_lang_changed, &ad);
event_callback.create = app_create;
event_callback.terminate = app_terminate;