aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDan Winship <danw@src.gnome.org>2003-05-05 03:11:39 +0800
committerDan Winship <danw@src.gnome.org>2003-05-05 03:11:39 +0800
commita64932a7754dcbc5d10fd77ecce959eb32e642cd (patch)
treea0f19065dc0dcdf867808dd638388855d51c0451
parent5e5ab23a8ca89a90621ac06766a610eefb669d62 (diff)
downloadgsoc2013-evolution-a64932a7754dcbc5d10fd77ecce959eb32e642cd.tar.gz
gsoc2013-evolution-a64932a7754dcbc5d10fd77ecce959eb32e642cd.tar.zst
gsoc2013-evolution-a64932a7754dcbc5d10fd77ecce959eb32e642cd.zip
Don't call g_utf8_validate on an empty message. Fixes a warning.
* camel-mime-part-utils.c (simple_data_wrapper_construct_from_parser): Don't call g_utf8_validate on an empty message. Fixes a warning. svn path=/trunk/; revision=21099
-rw-r--r--camel/ChangeLog6
-rw-r--r--camel/camel-mime-part-utils.c2
2 files changed, 7 insertions, 1 deletions
diff --git a/camel/ChangeLog b/camel/ChangeLog
index 50d0a158de..b8161f9336 100644
--- a/camel/ChangeLog
+++ b/camel/ChangeLog
@@ -1,3 +1,9 @@
+2003-05-02 Dan Winship <danw@ximian.com>
+
+ * camel-mime-part-utils.c
+ (simple_data_wrapper_construct_from_parser): Don't call
+ g_utf8_validate on an empty message. Fixes a warning.
+
2003-05-01 Jeffrey Stedfast <fejj@ximian.com>
Workaround for POS mailers like the one in bug #42045.
diff --git a/camel/camel-mime-part-utils.c b/camel/camel-mime-part-utils.c
index 33442f2b20..a3a5d390a4 100644
--- a/camel/camel-mime-part-utils.c
+++ b/camel/camel-mime-part-utils.c
@@ -393,7 +393,7 @@ simple_data_wrapper_construct_from_parser (CamelDataWrapper *dw, CamelMimeParser
/* we're not even going to bother trying to convert, so set the
rawtext bit to TRUE and let the mailer deal with it. */
dw->rawtext = TRUE;
- } else if (!strcasecmp (charset, "utf-8")) {
+ } else if (!strcasecmp (charset, "utf-8") && buffer->len) {
/* check that it is valid utf8 */
dw->rawtext = !g_utf8_validate (buffer->data, buffer->len, NULL);
}