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 | |
parent | 0ef312f45de342d9eb91bda74503497974c39084 (diff) | |
download | gsoc2013-evolution-86147a23faa53beec0178b0151b13280f8128d9c.tar gsoc2013-evolution-86147a23faa53beec0178b0151b13280f8128d9c.tar.gz gsoc2013-evolution-86147a23faa53beec0178b0151b13280f8128d9c.tar.bz2 gsoc2013-evolution-86147a23faa53beec0178b0151b13280f8128d9c.tar.lz gsoc2013-evolution-86147a23faa53beec0178b0151b13280f8128d9c.tar.xz 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
-rw-r--r-- | addressbook/ChangeLog | 5 | ||||
-rw-r--r-- | addressbook/util/eab-book-util.c | 7 |
2 files changed, 12 insertions, 0 deletions
diff --git a/addressbook/ChangeLog b/addressbook/ChangeLog index 1ffdb3ad50..a74a7ba96b 100644 --- a/addressbook/ChangeLog +++ b/addressbook/ChangeLog @@ -1,3 +1,8 @@ +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. + 2004-06-24 Radek Doulik <rodo@ximian.com> * gui/component/select-names/e-select-names-model.c 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); |