eml parser API causes crash. 01/90401/4
authorSan Cho <san.cho@samsung.com>
Tue, 10 May 2016 05:23:40 +0000 (14:23 +0900)
committerintae jeon <intae.jeon@samsung.com>
Mon, 10 Oct 2016 03:23:36 +0000 (20:23 -0700)
[Model] Z2
[BinType] AP
[Customer] N/A

[Issue#] P160504-07036, P160504-06929
[Request] PLM
[Occurrence Version] APE2

[Problem] eml file (airtel's mms file) was not parsed properly.
[Cause & Measure] Cause: the file's mime format was so strange.
Measure: Add checking null pointer
[Checking Method] push the eml file to device and trying to open it

[Team] Email
[Developer] san.cho@samsung.com
[Solution company] Samsung
[Change Type] PLM issue

Change-Id: I1c9c44f451b343d57642fb9176d0da8691b7e8ed

email-core/email-core-gmime.c

index 32456f6..ac34b2e 100755 (executable)
@@ -1226,7 +1226,7 @@ static void emcore_gmime_eml_parse_foreach_cb(GMimeObject *parent, GMimeObject *
                        }
 
                        /*cid replacement for inline attachment*/
-                       if (content_disposition_type == INLINE_ATTACHMENT) {
+                       if (cnt_info->text.html && content_disposition_type == INLINE_ATTACHMENT) {
                                char *file_content = NULL;
                                char *encoding_file_name = NULL;
                                int html_size = 0;