diff options
author | Jeffrey Stedfast <fejj@novell.com> | 2004-07-09 21:57:54 +0800 |
---|---|---|
committer | Jeffrey Stedfast <fejj@src.gnome.org> | 2004-07-09 21:57:54 +0800 |
commit | 31357665004adb9dfba27366bbe5df413aff8cb3 (patch) | |
tree | 729a2fa12f6251292e20a531b720a3d8ec0b4109 | |
parent | c892d0d8038b2584772b1673cf9de296ba44fff8 (diff) | |
download | gsoc2013-evolution-31357665004adb9dfba27366bbe5df413aff8cb3.tar.gz gsoc2013-evolution-31357665004adb9dfba27366bbe5df413aff8cb3.tar.zst gsoc2013-evolution-31357665004adb9dfba27366bbe5df413aff8cb3.zip |
Fix for bug #61199.
2004-07-07 Jeffrey Stedfast <fejj@novell.com>
Fix for bug #61199.
* em-format-html.c (efh_format_address): Same.
* em-format-quote.c (emfq_format_address): Make sure 'real' isn't
NULL before using.
svn path=/trunk/; revision=26606
-rw-r--r-- | mail/ChangeLog | 9 | ||||
-rw-r--r-- | mail/em-format-html.c | 13 | ||||
-rw-r--r-- | mail/em-format-quote.c | 15 |
3 files changed, 26 insertions, 11 deletions
diff --git a/mail/ChangeLog b/mail/ChangeLog index 8d92ae3b86..6b0eafccfc 100644 --- a/mail/ChangeLog +++ b/mail/ChangeLog @@ -1,3 +1,12 @@ +2004-07-07 Jeffrey Stedfast <fejj@novell.com> + + Fix for bug #61199. + + * em-format-html.c (efh_format_address): Same. + + * em-format-quote.c (emfq_format_address): Make sure 'real' isn't + NULL before using. + 2004-07-08 Frederic Crozat <fcrozat@mandrakesoft.com> * Makefile.am: diff --git a/mail/em-format-html.c b/mail/em-format-html.c index 824d3b115d..0cb3e15cb2 100644 --- a/mail/em-format-html.c +++ b/mail/em-format-html.c @@ -1433,11 +1433,14 @@ efh_format_address (GString *out, struct _camel_header_address *a) g_string_append_printf (out, "%s <", name); /* rfc2368 for mailto syntax and url encoding extras */ - real = camel_header_encode_phrase(a->name); - mailaddr = g_strdup_printf("%s <%s>", real, a->v.addr); - g_free(real); - mailto = camel_url_encode(mailaddr, "?=&()"); - g_free(mailaddr); + if ((real = camel_header_encode_phrase (a->name))) { + mailaddr = g_strdup_printf("%s <%s>", real, a->v.addr); + g_free (real); + mailto = camel_url_encode (mailaddr, "?=&()"); + g_free (mailaddr); + } else { + mailto = camel_url_encode (a->v.addr, "?=&()"); + } } else { mailto = camel_url_encode (a->v.addr, "?=&()"); } diff --git a/mail/em-format-quote.c b/mail/em-format-quote.c index e25b182a31..dc5695cfc2 100644 --- a/mail/em-format-quote.c +++ b/mail/em-format-quote.c @@ -209,14 +209,17 @@ emfq_format_address (GString *out, struct _camel_header_address *a) case CAMEL_HEADER_ADDRESS_NAME: if (name && *name) { char *real, *mailaddr; - + g_string_append_printf (out, "%s <", name); /* rfc2368 for mailto syntax and url encoding extras */ - real = camel_header_encode_phrase (a->name); - mailaddr = g_strdup_printf ("%s <%s>", real, a->v.addr); - g_free (real); - mailto = camel_url_encode (mailaddr, "?=&()"); - g_free (mailaddr); + if ((real = camel_header_encode_phrase (a->name))) { + mailaddr = g_strdup_printf ("%s <%s>", real, a->v.addr); + g_free (real); + mailto = camel_url_encode (mailaddr, "?=&()"); + g_free (mailaddr); + } else { + mailto = camel_url_encode (a->v.addr, "?=&()"); + } } else { mailto = camel_url_encode (a->v.addr, "?=&()"); } |