diff options
author | Hans Petter Jansson <hpj@ximian.com> | 2004-06-25 06:49:00 +0800 |
---|---|---|
committer | Hans Petter <hansp@src.gnome.org> | 2004-06-25 06:49:00 +0800 |
commit | 86147a23faa53beec0178b0151b13280f8128d9c (patch) | |
tree | 92d463ff2bf6ef7ae99ef803682fc4f72d4d2c96 /addressbook/util/eab-book-util.c | |
parent | 0ef312f45de342d9eb91bda74503497974c39084 (diff) | |
download | gsoc2013-evolution-86147a23faa53beec0178b0151b13280f8128d9c.tar.gz gsoc2013-evolution-86147a23faa53beec0178b0151b13280f8128d9c.tar.zst gsoc2013-evolution-86147a23faa53beec0178b0151b13280f8128d9c.zip |
Don't accept input that doesn't have at least a "BEGIN:VCARD" in it.
2004-06-24 Hans Petter Jansson <hpj@ximian.com>
* util/eab-book-util.c (eab_contact_list_from_string): Don't accept
input that doesn't have at least a "BEGIN:VCARD" in it.
svn path=/trunk/; revision=26505
Diffstat (limited to 'addressbook/util/eab-book-util.c')
-rw-r--r-- | addressbook/util/eab-book-util.c | 7 |
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); |