diff options
author | Not Zed <NotZed@Ximian.com> | 2004-02-23 21:47:21 +0800 |
---|---|---|
committer | Michael Zucci <zucchi@src.gnome.org> | 2004-02-23 21:47:21 +0800 |
commit | f6d01c691983d382d8bc33cbe3f34f8345995a88 (patch) | |
tree | 7fa982541aa0abe077b08f7b34b58ff814ae1f39 /mail | |
parent | cc5c9897d1e987a90474491a9c94ba7d2b2bc5bc (diff) | |
download | gsoc2013-evolution-f6d01c691983d382d8bc33cbe3f34f8345995a88.tar.gz gsoc2013-evolution-f6d01c691983d382d8bc33cbe3f34f8345995a88.tar.zst gsoc2013-evolution-f6d01c691983d382d8bc33cbe3f34f8345995a88.zip |
check mps->protocol != NULL before dereferencing it. See #54406.
2004-02-23 Not Zed <NotZed@Ximian.com>
* em-format.c (emf_multipart_signed): check mps->protocol != NULL
before dereferencing it. See #54406.
svn path=/trunk/; revision=24829
Diffstat (limited to 'mail')
-rw-r--r-- | mail/ChangeLog | 5 | ||||
-rw-r--r-- | mail/em-format.c | 14 |
2 files changed, 13 insertions, 6 deletions
diff --git a/mail/ChangeLog b/mail/ChangeLog index 284e5a6e95..ec9e01593a 100644 --- a/mail/ChangeLog +++ b/mail/ChangeLog @@ -1,3 +1,8 @@ +2004-02-23 Not Zed <NotZed@Ximian.com> + + * em-format.c (emf_multipart_signed): check mps->protocol != NULL + before dereferencing it. See #54406. + 2004-02-20 Jeffrey Stedfast <fejj@ximian.com> * em-folder-view.c (emfv_list_key_press): Delete key should always diff --git a/mail/em-format.c b/mail/em-format.c index c3194566d2..e107e39db4 100644 --- a/mail/em-format.c +++ b/mail/em-format.c @@ -1299,14 +1299,16 @@ emf_multipart_signed(EMFormat *emf, CamelStream *stream, CamelMimePart *part, co /* FIXME: Should be done via a plugin interface */ /* FIXME: duplicated in em-format-html-display.c */ + if (mps->protocol) { #ifdef ENABLE_SMIME - if (g_ascii_strcasecmp("application/x-pkcs7-signature", mps->protocol) == 0 - || g_ascii_strcasecmp("application/pkcs7-signature", mps->protocol) == 0) - cipher = camel_smime_context_new(emf->session); - else + if (g_ascii_strcasecmp("application/x-pkcs7-signature", mps->protocol) == 0 + || g_ascii_strcasecmp("application/pkcs7-signature", mps->protocol) == 0) + cipher = camel_smime_context_new(emf->session); + else #endif - if (g_ascii_strcasecmp("application/pgp-signature", mps->protocol) == 0) - cipher = camel_gpg_context_new(emf->session); + if (g_ascii_strcasecmp("application/pgp-signature", mps->protocol) == 0) + cipher = camel_gpg_context_new(emf->session); + } if (cipher == NULL) { em_format_format_error(emf, stream, _("Unsupported signature format")); |