aboutsummaryrefslogtreecommitdiffstats
path: root/addressbook/util
diff options
context:
space:
mode:
Diffstat (limited to 'addressbook/util')
-rw-r--r--addressbook/util/eab-book-util.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/addressbook/util/eab-book-util.c b/addressbook/util/eab-book-util.c
index f6429dee0a..c09cb259bb 100644
--- a/addressbook/util/eab-book-util.c
+++ b/addressbook/util/eab-book-util.c
@@ -219,6 +219,13 @@ eab_contact_list_from_string (const char *str)
temp = g_strdup (q);
}
+ /* Do a minimal well-formedness test, since
+ * e_contact_new_from_vcard () always returns a contact */
+ if (!strstr (p, "BEGIN:VCARD")) {
+ g_free (temp);
+ break;
+ }
+
contacts = g_list_append (contacts, e_contact_new_from_vcard (temp));
g_free (temp);