From 3205d67d1a715d90a78b79f52d813506eb650408 Mon Sep 17 00:00:00 2001 From: Suresh Chandrasekharan Date: Thu, 20 May 2004 20:34:59 +0000 Subject: Fix for #58738 ja_JP.UTF-8: Evolution crashes when certain ASCII/non-ASCII 2004-05-19 Suresh Chandrasekharan Fix for #58738 ja_JP.UTF-8: Evolution crashes when certain ASCII/non-ASCII combination is used in mail subject * camel-mime-utils.c: (camel_header_encode_string) Use camel_mime_is_lwsp for determining word separators, according to rfc822 (which's also same for rfc2047). g_unichar_isspace as word separator is illegal. svn path=/trunk/; revision=26021 --- camel/ChangeLog | 10 ++++++++++ camel/camel-mime-utils.c | 6 +++--- 2 files changed, 13 insertions(+), 3 deletions(-) (limited to 'camel') diff --git a/camel/ChangeLog b/camel/ChangeLog index ddd90a7ddc..613e682fb6 100644 --- a/camel/ChangeLog +++ b/camel/ChangeLog @@ -1,3 +1,13 @@ +2004-05-19 Suresh Chandrasekharan + + Fix for #58738 ja_JP.UTF-8: Evolution crashes when certain + ASCII/non-ASCII combination is used in mail subject + + * camel-mime-utils.c: (camel_header_encode_string) Use + camel_mime_is_lwsp for determining word separators, + according to rfc822 (which's also same for rfc2047). + g_unichar_isspace as word separator is illegal. + 2004-05-20 Jeffrey Stedfast Fixes bug #42295 and the infinite loop part of bug #58766 (these 2 diff --git a/camel/camel-mime-utils.c b/camel/camel-mime-utils.c index 13e9d815ef..43d680012e 100644 --- a/camel/camel-mime-utils.c +++ b/camel/camel-mime-utils.c @@ -1331,7 +1331,7 @@ camel_header_encode_string (const unsigned char *in) continue; } - if (g_unichar_isspace (c) && !last_was_space) { + if (camel_mime_is_lwsp (c) && !last_was_space) { /* we've reached the end of a 'word' */ if (word && !(last_was_encoded && encoding)) { /* output lwsp between non-encoded words */ @@ -1371,11 +1371,11 @@ camel_header_encode_string (const unsigned char *in) } else if (c >= 256) { encoding = MAX (encoding, 2); last_was_space = FALSE; - } else if (!g_unichar_isspace (c)) { + } else if (!camel_mime_is_lwsp (c)) { last_was_space = FALSE; } - if (!g_unichar_isspace (c) && !word) + if (!camel_mime_is_lwsp (c) && !word) word = inptr; inptr = newinptr; -- cgit