aboutsummaryrefslogtreecommitdiffstats
path: root/mail
diff options
context:
space:
mode:
Diffstat (limited to 'mail')
-rw-r--r--mail/ChangeLog9
-rw-r--r--mail/em-format-html.c13
-rw-r--r--mail/em-format-quote.c15
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 &lt;", 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 &lt;", 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, "?=&()");
}