that pesky g_assert (*inptr == '@'); crash again... surprisingly nothing in the mailer code actually used the /apps/evolution/mail/display/charset setting until now... this forces UTF-8 conversion which of course truncates out bad character sequences which then means that e_trie_search() gets sane input not sure if we want to bother making e_trie_search() more robust against garbage non-UTF-8 input, but I had started to look at fixing it that way originally until I realised that the mailer was simply not doing any charset conversion (which was a far simpler fix). I think what is happening in e_trie_search() is that prev is getting set to an invalid UTF-8 char in one pass of the while-loop and then the next pass finds a '@' and sets pat = prev; and then returns pat, which of course is invalid. or something like that... I thought I had it figured out but now looking at it I'm confused again so I dunno :) -- Jeffrey Stedfast Evolution Hacker - Novell, Inc. fejj ximian com - www.novell.com
Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/evolution/mail/ChangeLog,v
retrieving revision 1.3438
diff -u -r1.3438 ChangeLog
--- ChangeLog 24 Aug 2004 02:54:03 -0000 1.3438
+++ ChangeLog 25 Aug 2004 20:55:59 -0000
@@ -1,3 +1,26 @@
+2004-08-25 Jeffrey Stedfast <fejj novell com>
+
+ Fix for bug #63377
+
+ * em-format.c (em_format_format_text): Make sure that 'charset' is
+ never NULL, if it's NULL, then use 'iso-8859-1' this way we will
+ never pass invalid UTF-8 to the tohtml filter.
+ (emf_init): Init emf->default_charset to use the mailer charset
+ setting (up until now, nothing actually used that in mailer!?!?)
+ (emf_finalise): Free the default_charset string (would have leaked
+ if it were ever actually used before).
+
+2004-08-24 Jeffrey Stedfast <fejj novell com>
+
+ Fix for bug #63177
+
+ * em-folder-tree.c (emft_drop_async_drop): Check full_name == NULL
+ rather than full_name[0] since store's have NULL full_names, not
+ empty string (like they used to).
+ (emft_drop_folder): Same.
+ (tree_drag_data_received): Don't abort the drop if the user
+ dropped on a store, this is allowed (depending on the store).
+
2004-08-23 Not Zed <NotZed Ximian com>
* em-folder-tree.c (em_folder_tree_set_selected): store the
Index: em-format.c
===================================================================
RCS file: /cvs/gnome/evolution/mail/em-format.c,v
retrieving revision 1.38
diff -u -r1.38 em-format.c
--- em-format.c 10 Jul 2004 01:31:04 -0000 1.38
+++ em-format.c 25 Aug 2004 20:55:59 -0000
@@ -32,6 +32,8 @@
#include <libgnomevfs/gnome-vfs-mime-utils.h>
#include <libgnomevfs/gnome-vfs-mime-handlers.h>
+#include <gconf/gconf-client.h>
+
#include <e-util/e-msgport.h>
#include <camel/camel-url.h>
#include <camel/camel-stream.h>
@@ -116,11 +118,16 @@
emf_init(GObject *o)
{
EMFormat *emf = (EMFormat *)o;
+ GConfClient *gconf;
emf->inline_table = g_hash_table_new(g_str_hash, g_str_equal);
e_dlist_init(&emf->header_list);
em_format_default_headers(emf);
emf->part_id = g_string_new("");
+
+ gconf = gconf_client_get_default ();
+ emf->default_charset = gconf_client_get_string (gconf, "/apps/evolution/mail/display/charset", NULL);
+ g_object_unref (gconf);
}
static void
@@ -136,6 +143,7 @@
em_format_clear_headers(emf);
camel_cipher_validity_free(emf->valid);
+ g_free (emf->default_charset);
g_free(emf->charset);
g_string_free(emf->part_id, TRUE);
@@ -1016,7 +1024,8 @@
charset = camel_mime_filter_windows_real_charset (windows);
} else if (charset == NULL) {
- charset = emf->default_charset;
+ if (!(charset = emf->default_charset))
+ charset = "iso-8859-1";
}
filter_stream = camel_stream_filter_new_with_stream(stream);
Attachment:
smime.p7s
Description: S/MIME cryptographic signature