[evolution/webkit: 89/123] Prevent endless recursion when parsing SMIME-ecnrypted message fails
- From: Dan VrÃtil <dvratil src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution/webkit: 89/123] Prevent endless recursion when parsing SMIME-ecnrypted message fails
- Date: Thu, 19 Jan 2012 16:12:29 +0000 (UTC)
commit e55159fe6dcb7995e25d4910f7e1f73376bd516e
Author: Dan VrÃtil <dvratil redhat com>
Date: Tue Dec 20 09:48:39 2011 +0100
Prevent endless recursion when parsing SMIME-ecnrypted message fails
em-format/em-format.c | 10 ++++------
mail/em-format-html-display.c | 2 +-
2 files changed, 5 insertions(+), 7 deletions(-)
---
diff --git a/em-format/em-format.c b/em-format/em-format.c
index 2d8bc28..a23b897 100644
--- a/em-format/em-format.c
+++ b/em-format/em-format.c
@@ -221,8 +221,6 @@ emf_parse_application_xpkcs7mime (EMFormat *emf,
local_error->message ? local_error->message :
_("Could not parse S/MIME message: Unknown error"));
g_clear_error (&local_error);
-
- em_format_parse_part_as (emf, part, part_id, info, NULL, cancellable);
} else {
EMFormatParserInfo encinfo = {
info->handler,
@@ -1941,10 +1939,10 @@ em_format_parse_part_as (EMFormat *emf,
const EMFormatHandler *handler;
const CamelContentDisposition *disposition;
EMFormatParserInfo ninfo = {
- 0,
- info ? info->validity_type : 0,
- info ? info->validity : 0,
- 0,
+ .handler = 0,
+ .validity_type = info ? info->validity_type : 0,
+ .validity = info ? info->validity : 0,
+ .force_handler = 0
};
/* Let everything that claims to be an attachment or inlined part to be parsed
diff --git a/mail/em-format-html-display.c b/mail/em-format-html-display.c
index 1a1fe75..586a2cc 100644
--- a/mail/em-format-html-display.c
+++ b/mail/em-format-html-display.c
@@ -478,7 +478,7 @@ efhd_parse_attachment (EMFormat *emf,
/* Though it is an attachment, we still might be able to parse it and
* so discover some parts that we might be event able to display. */
- if (handler && handler->parse_func &&
+ if (handler && handler->parse_func && (handler->parse_func != efhd_parse_attachment) &&
((handler->flags & EM_FORMAT_HANDLER_COMPOUND_TYPE) ||
(handler->flags & EM_FORMAT_HANDLER_INLINE_DISPOSITION))) {
EMFormatParserInfo attachment_info = { .handler = handler,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]