diff options
-rw-r--r-- | camel/ChangeLog | 11 | ||||
-rw-r--r-- | camel/camel-filter-search.c | 2 | ||||
-rw-r--r-- | camel/camel-gpg-context.c | 15 | ||||
-rw-r--r-- | camel/camel-mime-part-utils.c | 3 | ||||
-rw-r--r-- | camel/camel-smime-context.c | 3 | ||||
-rw-r--r-- | camel/providers/groupwise/ChangeLog | 7 | ||||
-rw-r--r-- | camel/providers/groupwise/camel-groupwise-utils.c | 4 |
7 files changed, 43 insertions, 2 deletions
diff --git a/camel/ChangeLog b/camel/ChangeLog index 9d5096dea..b1425c2f4 100644 --- a/camel/ChangeLog +++ b/camel/ChangeLog @@ -1,3 +1,14 @@ +2007-08-16 Milan Crha <mcrha@redhat.com> + + ** Part of fix for bug #350539 + + * camel-filter-search.c: (check_header): + * camel-smime-context.c: (camel_smime_context_describe_part): + * camel-mime-part-utils.c: + (camel_mime_part_construct_content_from_parser): + * camel-gpg-context.c: (gpg_decrypt): + Ensures non-NULL part/message/dw/ipart/content. + 2007-08-14 Jens Granseuer <jensgr@gmx.net> ** Fix for bug #466309 diff --git a/camel/camel-filter-search.c b/camel/camel-filter-search.c index 6e3002048..29c9f3caf 100644 --- a/camel/camel-filter-search.c +++ b/camel/camel-filter-search.c @@ -173,7 +173,7 @@ check_header (struct _ESExp *f, int argc, struct _ESExpResult **argv, FilterMess /* FIXME: what about Resent-To, Resent-Cc and Resent-From? */ if (g_ascii_strcasecmp("to", name) == 0 || g_ascii_strcasecmp("cc", name) == 0 || g_ascii_strcasecmp("from", name) == 0) type = CAMEL_SEARCH_TYPE_ADDRESS_ENCODED; - else { + else if (message) { ct = camel_mime_part_get_content_type (CAMEL_MIME_PART (message)); if (ct) { charset = camel_content_type_param (ct, "charset"); diff --git a/camel/camel-gpg-context.c b/camel/camel-gpg-context.c index 135b2b48d..0a190efd6 100644 --- a/camel/camel-gpg-context.c +++ b/camel/camel-gpg-context.c @@ -1692,8 +1692,21 @@ gpg_decrypt(CamelCipherContext *context, CamelMimePart *ipart, CamelMimePart *op CamelMultipart *mp; CamelContentType *ct; int rv; - + + if (!ipart) { + camel_exception_setv (ex, CAMEL_EXCEPTION_SYSTEM, + _("Cannot decrypt message: Incorrect message format")); + return NULL; + } + content = camel_medium_get_content_object((CamelMedium *)ipart); + + if (!content) { + camel_exception_setv (ex, CAMEL_EXCEPTION_SYSTEM, + _("Cannot decrypt message: Incorrect message format")); + return NULL; + } + ct = camel_mime_part_get_content_type((CamelMimePart *)content); /* Encrypted part (using our fake mime type) or PGP/Mime multipart */ if (camel_content_type_is(ct, "multipart", "encrypted")) { diff --git a/camel/camel-mime-part-utils.c b/camel/camel-mime-part-utils.c index ce3340127..fd41a4405 100644 --- a/camel/camel-mime-part-utils.c +++ b/camel/camel-mime-part-utils.c @@ -86,6 +86,9 @@ camel_mime_part_construct_content_from_parser (CamelMimePart *dw, CamelMimeParse CamelContentType *ct; char *encoding; + if (!dw) + return; + ct = camel_mime_parser_content_type (mp); encoding = camel_content_transfer_encoding_decode (camel_mime_parser_header (mp, "Content-Transfer-Encoding", NULL)); diff --git a/camel/camel-smime-context.c b/camel/camel-smime-context.c index b21673688..a4ebf708e 100644 --- a/camel/camel-smime-context.c +++ b/camel/camel-smime-context.c @@ -134,6 +134,9 @@ camel_smime_context_describe_part(CamelSMIMEContext *context, CamelMimePart *par CamelContentType *ct; const char *tmp; + if (!part) + return flags; + ct = camel_mime_part_get_content_type(part); if (camel_content_type_is(ct, "multipart", "signed")) { diff --git a/camel/providers/groupwise/ChangeLog b/camel/providers/groupwise/ChangeLog index 866b8e245..5fc821330 100644 --- a/camel/providers/groupwise/ChangeLog +++ b/camel/providers/groupwise/ChangeLog @@ -1,3 +1,10 @@ +2007-08-16 Milan Crha <mcrha@redhat.com> + + ** Part of fix for bug #350539 + + * camel-groupwise-utils.c: (do_multipart): + Ensures non-NULL part. + 2007-07-30 Sankar P <psankar@novell.com> * camel-groupwise-folder.c: (groupwise_sync), diff --git a/camel/providers/groupwise/camel-groupwise-utils.c b/camel/providers/groupwise/camel-groupwise-utils.c index c89e9679c..11c903f8c 100644 --- a/camel/providers/groupwise/camel-groupwise-utils.c +++ b/camel/providers/groupwise/camel-groupwise-utils.c @@ -626,6 +626,10 @@ do_multipart (EGwConnection *cnc, EGwItem *item, CamelMultipart *mp, GSList **at * and an attachment otherwise..... */ part = camel_multipart_get_part (mp, i); + + if (!part) + continue; + type = camel_mime_part_get_content_type(part); dw = camel_medium_get_content_object (CAMEL_MEDIUM (part)); |