aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/vcard-inline
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2009-07-15 00:41:54 +0800
committerMatthew Barnes <mbarnes@redhat.com>2009-07-15 01:38:12 +0800
commit6d9e836a6fa0bb501f9fad4306373092bd758d29 (patch)
tree7843b42c00bc45175bbe8e80059cf2643aa1ee89 /plugins/vcard-inline
parent374bd42f69aca2e132fd854c9619f3d7491f1f96 (diff)
parente5fe0c9a3b74bf4910d768d65bb59a53c3792001 (diff)
downloadgsoc2013-evolution-6d9e836a6fa0bb501f9fad4306373092bd758d29.tar
gsoc2013-evolution-6d9e836a6fa0bb501f9fad4306373092bd758d29.tar.gz
gsoc2013-evolution-6d9e836a6fa0bb501f9fad4306373092bd758d29.tar.bz2
gsoc2013-evolution-6d9e836a6fa0bb501f9fad4306373092bd758d29.tar.lz
gsoc2013-evolution-6d9e836a6fa0bb501f9fad4306373092bd758d29.tar.xz
gsoc2013-evolution-6d9e836a6fa0bb501f9fad4306373092bd758d29.tar.zst
gsoc2013-evolution-6d9e836a6fa0bb501f9fad4306373092bd758d29.zip
Merge branch 'master' into kill-bonobo
Diffstat (limited to 'plugins/vcard-inline')
-rw-r--r--plugins/vcard-inline/vcard-inline.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/plugins/vcard-inline/vcard-inline.c b/plugins/vcard-inline/vcard-inline.c
index 7fc20b9dc1..0aafc8c82d 100644
--- a/plugins/vcard-inline/vcard-inline.c
+++ b/plugins/vcard-inline/vcard-inline.c
@@ -87,6 +87,7 @@ org_gnome_vcard_inline_decode (VCardInlinePObject *vcard_object,
GList *contact_list;
GByteArray *array;
const gchar *string;
+ const guint8 padding[2] = {0};
array = g_byte_array_new ();
medium = CAMEL_MEDIUM (mime_part);
@@ -96,11 +97,14 @@ org_gnome_vcard_inline_decode (VCardInlinePObject *vcard_object,
data_wrapper = camel_medium_get_content_object (medium);
camel_data_wrapper_decode_to_stream (data_wrapper, stream);
+ /* because the result is not NULL-terminated */
+ g_byte_array_append (array, padding, 2);
+
string = (gchar *) array->data;
contact_list = eab_contact_list_from_string (string);
vcard_object->contact_list = contact_list;
- camel_object_unref (data_wrapper);
+ camel_object_unref (mime_part);
camel_object_unref (stream);
}