aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--mail/ChangeLog6
-rw-r--r--mail/em-utils.c9
2 files changed, 12 insertions, 3 deletions
diff --git a/mail/ChangeLog b/mail/ChangeLog
index 3f1a34db6e..a43675bfa7 100644
--- a/mail/ChangeLog
+++ b/mail/ChangeLog
@@ -1,3 +1,9 @@
+2004-02-26 Jeffrey Stedfast <fejj@ximian.com>
+
+ * em-utils.c (em_utils_folder_name_from_uri): Make sure url->path
+ is non-NULL before setting folder_name to url->path + 1. Could
+ possibly fix bug #54853.
+
2004-02-25 Jeffrey Stedfast <fejj@ximian.com>
* em-format-html-display.c (efhd_attachment_button): Protect
diff --git a/mail/em-utils.c b/mail/em-utils.c
index 4cf0abac4a..24622329f1 100644
--- a/mail/em-utils.c
+++ b/mail/em-utils.c
@@ -2484,12 +2484,15 @@ char *
em_utils_folder_name_from_uri (const char *uri)
{
CamelURL *url;
- char *folder_name;
+ char *folder_name = NULL;
if (uri == NULL || (url = camel_url_new (uri, NULL)) == NULL)
- return NULL;
+ return NULL;
- folder_name = url->fragment ? url->fragment : url->path + 1;
+ if (url->fragment)
+ folder_name = url->fragment;
+ else if (url->path)
+ folder_name = url->path + 1;
if (folder_name == NULL) {
camel_url_free (url);