aboutsummaryrefslogtreecommitdiffstats
path: root/mail
diff options
context:
space:
mode:
authorMilan Crha <mcrha@redhat.com>2009-05-27 21:15:28 +0800
committerMilan Crha <mcrha@redhat.com>2009-05-27 21:15:28 +0800
commitb9149e4e89d6fc56505b75de1e3e0c13dada4b3e (patch)
tree746f315528ffac56a553c2d678cbaabab5f2c90c /mail
parent5825d072d2ece1ec9ed98c42e146523dabce7288 (diff)
downloadgsoc2013-evolution-b9149e4e89d6fc56505b75de1e3e0c13dada4b3e.tar.gz
gsoc2013-evolution-b9149e4e89d6fc56505b75de1e3e0c13dada4b3e.tar.zst
gsoc2013-evolution-b9149e4e89d6fc56505b75de1e3e0c13dada4b3e.zip
Bug #540269 - Do not crash in em_format_is_attachment
Check if part contains data wrapper before accessing its members.
Diffstat (limited to 'mail')
-rw-r--r--mail/em-format.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/mail/em-format.c b/mail/em-format.c
index b2360bb2fc..83f0d4acfe 100644
--- a/mail/em-format.c
+++ b/mail/em-format.c
@@ -991,6 +991,9 @@ int em_format_is_attachment(EMFormat *emf, CamelMimePart *part)
/*CamelContentType *ct = camel_mime_part_get_content_type(part);*/
CamelDataWrapper *dw = camel_medium_get_content_object((CamelMedium *)part);
+ if (!dw)
+ return 0;
+
/*printf("checking is attachment %s/%s\n", ct->type, ct->subtype);*/
return !(camel_content_type_is (dw->mime_type, "multipart", "*")
|| camel_content_type_is(dw->mime_type, "application", "x-pkcs7-mime")