Unchecked Return Value (Coverty issue 110465) 30/191930/4
authorkamaljeet <kamal.jc@samsung.com>
Thu, 25 Oct 2018 13:04:52 +0000 (18:34 +0530)
committerkamaljeet <kamal.jc@samsung.com>
Wed, 31 Oct 2018 12:44:23 +0000 (18:14 +0530)
Change-Id: I0e623853680bd29ff96cb48f2605747840d35ed8
Signed-off-by: kamaljeet <kamal.jc@samsung.com>
email-core/email-core-mail.c
email-core/email-storage/email-storage.c

index 5a0ffbc..72f6f59 100755 (executable)
@@ -2906,10 +2906,10 @@ INTERNAL_FUNC int emcore_gmime_download_body_sections(char *multi_user_name,
 
                if (cnt_info->text.html_charset != NULL) {
                        memcpy(html_body, cnt_info->text.html_charset, EM_SAFE_STRLEN(cnt_info->text.html_charset));
-                       strcat(html_body, HTML_EXTENSION_STRING);
+                       strncat(html_body, HTML_EXTENSION_STRING, MAX_PATH);
                } else if (cnt_info->text.plain_charset != NULL) {
                        memcpy(html_body, cnt_info->text.plain_charset, EM_SAFE_STRLEN(cnt_info->text.plain_charset));
-                       strcat(html_body, HTML_EXTENSION_STRING);
+                       strncat(html_body, HTML_EXTENSION_STRING, MAX_PATH);
                } else {
                        memcpy(html_body, "UTF-8.htm", strlen("UTF-8.htm"));
                }
index 336d830..5d5157b 100755 (executable)
@@ -1525,7 +1525,9 @@ static int _delete_temp_file(const char *path)
 
        while ((entry = readdir(dp)) != NULL) {
                SNPRINTF(buf, sizeof(buf), "%s/%s", path, entry->d_name);
-               remove(buf);
+               if (remove(buf) != 0) {
+                       EM_DEBUG_EXCEPTION("File Deletion Failed`");
+               }
        }
 
        closedir(dp);