aboutsummaryrefslogtreecommitdiffstats
path: root/mail
diff options
context:
space:
mode:
Diffstat (limited to 'mail')
-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);
+ }
}
}