diff options
author | Jeffrey Stedfast <fejj@ximian.com> | 2004-02-27 00:40:34 +0800 |
---|---|---|
committer | Jeffrey Stedfast <fejj@src.gnome.org> | 2004-02-27 00:40:34 +0800 |
commit | 1e99d93fbecd6b6c2f5feabb16d5da3b14e20075 (patch) | |
tree | 3f2b90530fe9973508f6cf421f78a869980e7bf9 | |
parent | 74abd9591145248fb1cf65c7270739e109eefec9 (diff) | |
download | gsoc2013-evolution-1e99d93fbecd6b6c2f5feabb16d5da3b14e20075.tar.gz gsoc2013-evolution-1e99d93fbecd6b6c2f5feabb16d5da3b14e20075.tar.zst gsoc2013-evolution-1e99d93fbecd6b6c2f5feabb16d5da3b14e20075.zip |
Make sure url->path is non-NULL before setting folder_name to url->path +
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.
svn path=/trunk/; revision=24887
-rw-r--r-- | mail/ChangeLog | 6 | ||||
-rw-r--r-- | mail/em-utils.c | 9 |
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); |