aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPeter Williams <peterw@ximian.com>2001-07-07 04:28:39 +0800
committerPeter Williams <peterw@src.gnome.org>2001-07-07 04:28:39 +0800
commit0995aedae9fd9ef1d6bc5472a14d3d32c13186a4 (patch)
tree8eab00aa1d358826fc86b130944d46afeec6b02f
parentea8185e64b61fd8d97ecd8e4745698d4020f2a5f (diff)
downloadgsoc2013-evolution-0995aedae9fd9ef1d6bc5472a14d3d32c13186a4.tar.gz
gsoc2013-evolution-0995aedae9fd9ef1d6bc5472a14d3d32c13186a4.tar.zst
gsoc2013-evolution-0995aedae9fd9ef1d6bc5472a14d3d32c13186a4.zip
Prevent infinite recursion when viewing attachments that we can't /
2001-07-06 Peter Williams <peterw@ximian.com> * mail-format.c (format_mime_part): Prevent infinite recursion when viewing attachments that we can't / shouldn't display but are some form of plaintext. Cf bug #2234 svn path=/trunk/; revision=10857
-rw-r--r--mail/ChangeLog6
-rw-r--r--mail/mail-format.c19
2 files changed, 20 insertions, 5 deletions
diff --git a/mail/ChangeLog b/mail/ChangeLog
index 973e9d85ea..3dc30678fb 100644
--- a/mail/ChangeLog
+++ b/mail/ChangeLog
@@ -1,3 +1,9 @@
+2001-07-06 Peter Williams <peterw@ximian.com>
+
+ * mail-format.c (format_mime_part): Prevent infinite recursion when
+ viewing attachments that we can't / shouldn't display but are some
+ form of plaintext. Cf bug #2234
+
2001-07-06 Jeffrey Stedfast <fejj@ximian.com>
* folder-browser.c (folder_browser_copy): Freeze and Thaw the
diff --git a/mail/mail-format.c b/mail/mail-format.c
index dceee68a37..517d0b7595 100644
--- a/mail/mail-format.c
+++ b/mail/mail-format.c
@@ -590,11 +590,20 @@ format_mime_part (CamelMimePart *part, MailDisplay *md)
if (!handler) {
char *id_type;
- id_type = mail_identify_mime_part (part, md);
- if (id_type) {
- g_free (mime_type);
- mime_type = id_type;
- handler = mail_lookup_handler (id_type);
+ /* Special case MIME types that we know that we can't
+ * display but are some kind of plain text to prevent
+ * evil infinite recursion.
+ */
+
+ if (!strcmp (mime_type, "application/mac-binhex40")) {
+ handler = NULL;
+ } else {
+ id_type = mail_identify_mime_part (part, md);
+ if (id_type) {
+ g_free (mime_type);
+ mime_type = id_type;
+ handler = mail_lookup_handler (id_type);
+ }
}
}