SVACE Issue fix 86/272986/1 tizen_6.5
authorAbhimanyu <abhimanyu1.s@samsung.com>
Tue, 1 Feb 2022 04:57:19 +0000 (10:27 +0530)
committerAbhimanyu Swami <abhimanyu1.s@samsung.com>
Tue, 29 Mar 2022 08:34:17 +0000 (08:34 +0000)
Change-Id: Ie9946876a56dbec1ddf70d3eb119d78e8458e533
Signed-off-by: Abhimanyu <abhimanyu1.s@samsung.com>
(cherry picked from commit ee8e0c4851ec4baa4f44eef3368c67f2a8aa529d)

email-core/email-core-event.c
test/testapp-gmime.c

index e4d75710ea0cd28dbd381af94758216c738a8dc3..86e53854ceaa3f0215c512a5265cfab94a55b133 100755 (executable)
@@ -1716,9 +1716,13 @@ static void emcore_adjust_sync_mail_flag_event_priority()
        }
 
        email_event_t *first = g_queue_peek_nth(g_event_que, 0);
+       if (first == NULL) EM_DEBUG_EXCEPTION("Queue size zero");
        if (is_sync_mail_flag_event && first->type == EMAIL_EVENT_SYNC_HEADER) {
                // copy sync event and push to event queue
                email_event_t *sync_event = em_malloc(sizeof(email_event_t));
+               if (sync_event == NULL) {
+                       EM_DEBUG_EXCEPTION("em_malloc failed");
+               }
                memcpy(sync_event, first, sizeof(email_event_t));
                sync_event->multi_user_name = g_strdup(first->multi_user_name);
                sync_event->event_param_data_1 = g_strdup(first->event_param_data_1);
index 011ce90730ece78fa9a45969b4a9d91fba8e23e1..6ee251fed0dfab1eb8246d90929dae6ae62a60ef 100644 (file)
@@ -139,6 +139,10 @@ static gboolean testapp_test_gmime_eml_parsing(void)
 
        /* parse the message from the stream */
        message = g_mime_parser_construct_message(parser);
+       if (message == NULL){
+               testapp_print("g_mime_parser_construct_message error");
+               return FALSE;
+       }
 
        /* free the parser (and the stream) */
        g_object_unref(parser);