aboutsummaryrefslogtreecommitdiffstats
path: root/mail/em-format-html.c
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2007-09-28 04:20:56 +0800
committerMatthew Barnes <mbarnes@src.gnome.org>2007-09-28 04:20:56 +0800
commit7352689ab7e6cfa835d52035f76756879306cfa9 (patch)
treeece92aafcc46ee9be4a6dcde5273aaedca7517b4 /mail/em-format-html.c
parente2e5e8d754f24a9f5c1ed0434c83dcd486a356eb (diff)
downloadgsoc2013-evolution-7352689ab7e6cfa835d52035f76756879306cfa9.tar
gsoc2013-evolution-7352689ab7e6cfa835d52035f76756879306cfa9.tar.gz
gsoc2013-evolution-7352689ab7e6cfa835d52035f76756879306cfa9.tar.bz2
gsoc2013-evolution-7352689ab7e6cfa835d52035f76756879306cfa9.tar.lz
gsoc2013-evolution-7352689ab7e6cfa835d52035f76756879306cfa9.tar.xz
gsoc2013-evolution-7352689ab7e6cfa835d52035f76756879306cfa9.tar.zst
gsoc2013-evolution-7352689ab7e6cfa835d52035f76756879306cfa9.zip
** Fixes part of bug #474000
2007-09-27 Matthew Barnes <mbarnes@redhat.com> ** Fixes part of bug #474000 * addressbook/importers/evolution-ldif-importer.c: Remove redundant Base64 codec implementation. Use GLib's. * mail/em-format-html.c (efh_format_headers): * mail/em-migrate.c (upgrade_passwords_1_2): * plugins/face/face.c: Use GLib's Base64 API instead of Camel's. svn path=/trunk/; revision=34325
Diffstat (limited to 'mail/em-format-html.c')
-rw-r--r--mail/em-format-html.c20
1 files changed, 9 insertions, 11 deletions
diff --git a/mail/em-format-html.c b/mail/em-format-html.c
index b8e96ae3d9..eb2ae95c3d 100644
--- a/mail/em-format-html.c
+++ b/mail/em-format-html.c
@@ -1786,8 +1786,8 @@ efh_format_headers(EMFormatHTML *efh, CamelStream *stream, CamelMedium *part)
const char *photo_name = NULL;
CamelInternetAddress *cia = NULL;
gboolean face_decoded = FALSE;
- char *face_header_value = NULL;
- int face_header_len = 0;
+ guchar *face_header_value = NULL;
+ gsize face_header_len = 0;
char *header_sender = NULL, *header_from = NULL, *name;
gboolean mail_from_delegate = FALSE;
@@ -1896,16 +1896,14 @@ efh_format_headers(EMFormatHTML *efh, CamelStream *stream, CamelMedium *part)
if (strstr(header->value, "Evolution"))
have_icon = TRUE;
} else if (!g_ascii_strcasecmp (header->name, "Face") && !face_decoded) {
- char *tmp;
-
- face_decoded = TRUE;
- tmp = g_strdup (header->value);
- for (; *tmp == ' '; tmp++);
+ gchar *cp;
- face_header_len = camel_base64_decode_simple (tmp, strlen(tmp));
- tmp[face_header_len] = 0;
-
- face_header_value = tmp;
+ /* Skip over spaces */
+ for (cp = header->name; *cp == ' '; cp++);
+ face_header_value = g_base64_decode (cp, &face_header_len);
+ face_header_value = g_realloc (face_header_value, face_header_len + 1);
+ face_header_value[face_header_len] = 0;
+ face_decoded = TRUE;
} else if (!g_ascii_strcasecmp (header->name, h->name)) {
efh_format_header(emf, stream, part, header, h->flags, charset);