diff options
author | Not Zed <NotZed@Ximian.com> | 2005-08-03 15:55:16 +0800 |
---|---|---|
committer | Michael Zucci <zucchi@src.gnome.org> | 2005-08-03 15:55:16 +0800 |
commit | 233ed2076268ad6ca7d6cbf75cf2b2983408fa77 (patch) | |
tree | e47eaaf56dd6d69df5d1acb01a085adc92332593 /plugins | |
parent | ea16178be7d85d9a16df1505f16ce8cb300107ca (diff) | |
download | gsoc2013-evolution-233ed2076268ad6ca7d6cbf75cf2b2983408fa77.tar gsoc2013-evolution-233ed2076268ad6ca7d6cbf75cf2b2983408fa77.tar.gz gsoc2013-evolution-233ed2076268ad6ca7d6cbf75cf2b2983408fa77.tar.bz2 gsoc2013-evolution-233ed2076268ad6ca7d6cbf75cf2b2983408fa77.tar.lz gsoc2013-evolution-233ed2076268ad6ca7d6cbf75cf2b2983408fa77.tar.xz gsoc2013-evolution-233ed2076268ad6ca7d6cbf75cf2b2983408fa77.tar.zst gsoc2013-evolution-233ed2076268ad6ca7d6cbf75cf2b2983408fa77.zip |
allocate enough space for the url. May be related to #304461.
2005-08-02 Not Zed <NotZed@Ximian.com>
* mailing-list-actions.c (emla_list_action_do): allocate enough
space for the url. May be related to #304461.
svn path=/trunk/; revision=29964
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/mailing-list-actions/ChangeLog | 5 | ||||
-rw-r--r-- | plugins/mailing-list-actions/mailing-list-actions.c | 9 |
2 files changed, 8 insertions, 6 deletions
diff --git a/plugins/mailing-list-actions/ChangeLog b/plugins/mailing-list-actions/ChangeLog index 87ccbbdae8..994c8e5419 100644 --- a/plugins/mailing-list-actions/ChangeLog +++ b/plugins/mailing-list-actions/ChangeLog @@ -1,3 +1,8 @@ +2005-08-02 Not Zed <NotZed@Ximian.com> + + * mailing-list-actions.c (emla_list_action_do): allocate enough + space for the url. May be related to #304461. + 2005-05-16 Not Zed <NotZed@Ximian.com> * mailing-list-actions.c: moved e-error to e-util diff --git a/plugins/mailing-list-actions/mailing-list-actions.c b/plugins/mailing-list-actions/mailing-list-actions.c index b1d0b79e9b..9bed95a76d 100644 --- a/plugins/mailing-list-actions/mailing-list-actions.c +++ b/plugins/mailing-list-actions/mailing-list-actions.c @@ -136,9 +136,7 @@ void emla_list_action_do (CamelFolder *folder, const char *uid, CamelMimeMessage } /* get URL portion */ - url = (char *) malloc (end - headerpos); - strncpy (url, headerpos, end - headerpos); - url[end-headerpos] = '\0'; + url = g_strndup(headerpos, end - headerpos); if (strncmp (url, "mailto:", 6) == 0) { if (emla_action_headers[t].interactive) @@ -165,7 +163,7 @@ void emla_list_action_do (CamelFolder *folder, const char *uid, CamelMimeMessage goto exit; g_error_free (err); } - free (url); + g_free (url); url = NULL; headerpos = end++; @@ -182,8 +180,7 @@ void emla_list_action_do (CamelFolder *folder, const char *uid, CamelMimeMessage exit: free (action_data->uri); free (action_data); - if (url) - free(url); + g_free(url); } void emla_list_help (EPlugin *item, EMMenuTargetSelect* sel) |