From: Abhimanyu Date: Tue, 1 Feb 2022 04:57:19 +0000 (+0530) Subject: SVACE Issue fix X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fheads%2Ftizen_6.5;p=platform%2Fcore%2Fmessaging%2Femail-service.git SVACE Issue fix Change-Id: Ie9946876a56dbec1ddf70d3eb119d78e8458e533 Signed-off-by: Abhimanyu (cherry picked from commit ee8e0c4851ec4baa4f44eef3368c67f2a8aa529d) --- diff --git a/email-core/email-core-event.c b/email-core/email-core-event.c index e4d7571..86e5385 100755 --- a/email-core/email-core-event.c +++ b/email-core/email-core-event.c @@ -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); diff --git a/test/testapp-gmime.c b/test/testapp-gmime.c index 011ce90..6ee251f 100644 --- a/test/testapp-gmime.c +++ b/test/testapp-gmime.c @@ -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);