Check sender pid is valid 17/198617/1 submit/tizen/20190131.015336
authorDaehyeon Jung <darrenh.jung@samsung.com>
Mon, 28 Jan 2019 06:19:19 +0000 (15:19 +0900)
committerDaehyeon Jung <darrenh.jung@samsung.com>
Mon, 28 Jan 2019 06:20:27 +0000 (15:20 +0900)
Change-Id: I33746714c64b99ef60a07429c81cd50985a8e031
Signed-off-by: Daehyeon Jung <darrenh.jung@samsung.com>
src/widget_instance.c

index 4c26603..b041acb 100644 (file)
@@ -851,6 +851,10 @@ static int __widget_handler(const char *viewer_id, aul_app_com_result_e e, bundl
        if (*status == WIDGET_INSTANCE_EVENT_APP_RESTART_REQUEST) {
                LOGW("WIDGET_INSTANCE_EVENT_APP_RESTART_REQUEST notify");
                bundle_get_str(envelope, AUL_K_COM_SENDER_PID, &sender_pid_str);
+               if (sender_pid_str == NULL) {
+                       LOGE("Failed to get sender pid of %s", widget_id);
+                       return 0;
+               }
                sender_pid = atoi(sender_pid_str);
                ret = __check_valid_sender(widget_id, sender_pid);
                if (ret == 0)