[evolution-data-server/gnome-3-28] Bug 794534 - Runtime warning when Content-Type header is invalid
- From: Milan Crha <mcrha src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution-data-server/gnome-3-28] Bug 794534 - Runtime warning when Content-Type header is invalid
- Date: Thu, 22 Mar 2018 13:16:42 +0000 (UTC)
commit 943690676b7431c886a461cedf4a4c935b5ed2f9
Author: Milan Crha <mcrha redhat com>
Date: Thu Mar 22 14:16:47 2018 +0100
Bug 794534 - Runtime warning when Content-Type header is invalid
src/camel/camel-mime-part.c | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
---
diff --git a/src/camel/camel-mime-part.c b/src/camel/camel-mime-part.c
index beabf46..76cbe2a 100644
--- a/src/camel/camel-mime-part.c
+++ b/src/camel/camel-mime-part.c
@@ -309,6 +309,7 @@ mime_part_process_header (CamelMedium *medium,
{
CamelMimePart *mime_part = CAMEL_MIME_PART (medium);
CamelHeaderType header_type;
+ CamelContentType *content_type;
const gchar *charset;
gchar *text;
@@ -348,7 +349,9 @@ mime_part_process_header (CamelMedium *medium,
mime_part->priv->content_location = camel_header_location_decode (value);
break;
case HEADER_CONTENT_TYPE:
- camel_data_wrapper_take_mime_type_field (CAMEL_DATA_WRAPPER (mime_part),
camel_content_type_decode (value));
+ content_type = camel_content_type_decode (value);
+ if (content_type)
+ camel_data_wrapper_take_mime_type_field (CAMEL_DATA_WRAPPER (mime_part),
content_type);
break;
default:
return FALSE;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]