diff options
author | Matthew Barnes <mbarnes@redhat.com> | 2007-09-28 04:20:56 +0800 |
---|---|---|
committer | Matthew Barnes <mbarnes@src.gnome.org> | 2007-09-28 04:20:56 +0800 |
commit | 7352689ab7e6cfa835d52035f76756879306cfa9 (patch) | |
tree | ece92aafcc46ee9be4a6dcde5273aaedca7517b4 /mail | |
parent | e2e5e8d754f24a9f5c1ed0434c83dcd486a356eb (diff) | |
download | gsoc2013-evolution-7352689ab7e6cfa835d52035f76756879306cfa9.tar.gz 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')
-rw-r--r-- | mail/ChangeLog | 8 | ||||
-rw-r--r-- | mail/em-format-html.c | 20 | ||||
-rw-r--r-- | mail/em-migrate.c | 7 |
3 files changed, 22 insertions, 13 deletions
diff --git a/mail/ChangeLog b/mail/ChangeLog index 54ac99880c..b55544c979 100644 --- a/mail/ChangeLog +++ b/mail/ChangeLog @@ -1,3 +1,11 @@ +2007-09-27 Matthew Barnes <mbarnes@redhat.com> + + ** Fixes part of bug #477045 + + * em-format-html.c (efh_format_headers): + * em-migrate.c (upgrade_passwords_1_2): + Use GLib's Base64 API instead of Camel's. + 2007-09-27 Hiroyuki Ikezoe <poincare@ikezoe.net> ** Fix for bug #461195 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); diff --git a/mail/em-migrate.c b/mail/em-migrate.c index 6df7e109c1..2fc53ebf5f 100644 --- a/mail/em-migrate.c +++ b/mail/em-migrate.c @@ -778,10 +778,13 @@ upgrade_passwords_1_2(void) if (namep && valuep) { char *value = e_bconf_hex_decode(valuep); + guchar *decoded; char *p, *new; - size_t len; + gsize len; - len = camel_base64_decode_simple(namep, strlen(namep)); + decoded = g_base64_decode (namep, &len); + memcpy (namep, decoded, len); + g_free (decoded); namep[len] = 0; p = namep; |