From 32380aa7c9a7d50f47d7b50780c560da6ce5fe3c Mon Sep 17 00:00:00 2001 From: Federico Mena Quintero Date: Tue, 15 Jul 2003 19:47:57 +0000 Subject: Handle invalid URIs, or more likely, the last empty element in a URI list 2003-07-15 Federico Mena Quintero * folder-browser.c (message_list_drag_data_received): Handle invalid URIs, or more likely, the last empty element in a URI list --- g_strsplit() will yield { "uri1", "", NULL }. Fixes #46398. * component-factory.c (destination_folder_handle_drop): Likewise. svn path=/trunk/; revision=21818 --- mail/ChangeLog | 8 ++++++++ mail/component-factory.c | 4 ++++ mail/folder-browser.c | 4 ++++ 3 files changed, 16 insertions(+) diff --git a/mail/ChangeLog b/mail/ChangeLog index 0632fb7935..361700937e 100644 --- a/mail/ChangeLog +++ b/mail/ChangeLog @@ -1,3 +1,11 @@ +2003-07-15 Federico Mena Quintero + + * folder-browser.c (message_list_drag_data_received): Handle + invalid URIs, or more likely, the last empty element in a URI list + --- g_strsplit() will yield { "uri1", "", NULL }. Fixes #46398. + + * component-factory.c (destination_folder_handle_drop): Likewise. + 2003-07-15 Yuedong Du * mail-config.c: (config_write_style), (mail_config_init): remove diff --git a/mail/component-factory.c b/mail/component-factory.c index a228868a58..b3077f5699 100644 --- a/mail/component-factory.c +++ b/mail/component-factory.c @@ -630,6 +630,10 @@ destination_folder_handle_drop (EvolutionShellComponentDndDestinationFolder *des uri = camel_url_new (url, NULL); g_free (url); + + if (!uri) + continue; + url = uri->path; uri->path = NULL; camel_url_free (uri); diff --git a/mail/folder-browser.c b/mail/folder-browser.c index b48f3f4b61..8a15cc4135 100644 --- a/mail/folder-browser.c +++ b/mail/folder-browser.c @@ -533,6 +533,10 @@ message_list_drag_data_received (ETree *tree, int row, ETreePath path, int col, uri = camel_url_new (url, NULL); g_free (url); + + if (!uri) + continue; + url = uri->path; uri->path = NULL; camel_url_free (uri); -- cgit v1.2.3