From 96d94fc6708215dc1a7d3fa3d1c8324446e0d95c Mon Sep 17 00:00:00 2001 From: Jeffrey Stedfast Date: Thu, 11 Jul 2002 18:24:32 +0000 Subject: Don't forget to set an appropriate exception before returning NULL. 2002-07-11 Jeffrey Stedfast * camel-multipart-encrypted.c (camel_multipart_encrypted_decrypt): Don't forget to set an appropriate exception before returning NULL. svn path=/trunk/; revision=17418 --- camel/ChangeLog | 6 ++++++ camel/camel-multipart-encrypted.c | 2 ++ 2 files changed, 8 insertions(+) (limited to 'camel') diff --git a/camel/ChangeLog b/camel/ChangeLog index 8c8a069355..787e30a12e 100644 --- a/camel/ChangeLog +++ b/camel/ChangeLog @@ -1,3 +1,9 @@ +2002-07-11 Jeffrey Stedfast + + * camel-multipart-encrypted.c (camel_multipart_encrypted_decrypt): + Don't forget to set an appropriate exception before returning + NULL. + 2002-07-10 Jeffrey Stedfast * camel-filter-driver.c (get_message_cb): Make sure message is diff --git a/camel/camel-multipart-encrypted.c b/camel/camel-multipart-encrypted.c index 014f02726b..b8856ad799 100644 --- a/camel/camel-multipart-encrypted.c +++ b/camel/camel-multipart-encrypted.c @@ -282,6 +282,8 @@ camel_multipart_encrypted_decrypt (CamelMultipartEncrypted *mpe, encrypted_part = camel_multipart_get_part (CAMEL_MULTIPART (mpe), CAMEL_MULTIPART_ENCRYPTED_CONTENT); mime_type = camel_mime_part_get_content_type (encrypted_part); if (!header_content_type_is (mime_type, "application", "octet-stream")) { + camel_exception_set (ex, CAMEL_EXCEPTION_SYSTEM, + _("Failed to decrypt MIME part: invalid structure")); camel_object_unref (encrypted_part); camel_object_unref (version_part); return NULL; -- cgit v1.2.3