diff options
author | Milan Crha <mcrha@redhat.com> | 2009-07-14 18:14:02 +0800 |
---|---|---|
committer | Milan Crha <mcrha@redhat.com> | 2009-07-14 18:14:02 +0800 |
commit | c29de62e45422535cb33bcc5d66ddb0e0f97f934 (patch) | |
tree | 0d37996fd5fdd5066b1f1807fadec1091cd3d0c7 /plugins/vcard-inline | |
parent | ecf403c2b94b8e3ca65f487a098317e173321f7d (diff) | |
download | gsoc2013-evolution-c29de62e45422535cb33bcc5d66ddb0e0f97f934.tar gsoc2013-evolution-c29de62e45422535cb33bcc5d66ddb0e0f97f934.tar.gz gsoc2013-evolution-c29de62e45422535cb33bcc5d66ddb0e0f97f934.tar.bz2 gsoc2013-evolution-c29de62e45422535cb33bcc5d66ddb0e0f97f934.tar.lz gsoc2013-evolution-c29de62e45422535cb33bcc5d66ddb0e0f97f934.tar.xz gsoc2013-evolution-c29de62e45422535cb33bcc5d66ddb0e0f97f934.tar.zst gsoc2013-evolution-c29de62e45422535cb33bcc5d66ddb0e0f97f934.zip |
Bug #586109 - [vcard-inline] Crash while rendering inline vcard
Diffstat (limited to 'plugins/vcard-inline')
-rw-r--r-- | plugins/vcard-inline/vcard-inline.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/plugins/vcard-inline/vcard-inline.c b/plugins/vcard-inline/vcard-inline.c index 916774b4f0..6c4eeebff6 100644 --- a/plugins/vcard-inline/vcard-inline.c +++ b/plugins/vcard-inline/vcard-inline.c @@ -88,6 +88,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); @@ -97,11 +98,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); } |