From: Milan Crha Date: Mon, 23 Apr 2012 11:44:11 +0000 (+0200) Subject: Bug #668549 - Crash in objects_added_cb() in e-book-client-view.c X-Git-Tag: upstream/3.7.4~961 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=516e6d17bfc0b20a255005f0dba4af6923a220ac;p=platform%2Fupstream%2Fevolution-data-server.git Bug #668549 - Crash in objects_added_cb() in e-book-client-view.c --- diff --git a/addressbook/libebook/e-book-client-view.c b/addressbook/libebook/e-book-client-view.c index dc271f1..0c53524 100644 --- a/addressbook/libebook/e-book-client-view.c +++ b/addressbook/libebook/e-book-client-view.c @@ -69,7 +69,7 @@ objects_added_cb (EGdbusBookView *object, return; /* array contains both UID and vcard */ - for (p = vcards; *p; p += 2) { + for (p = vcards; p[0] && p[1]; p += 2) { contacts = g_slist_prepend (contacts, e_contact_new_from_vcard_with_uid (p[0], p[1])); } @@ -92,7 +92,7 @@ objects_modified_cb (EGdbusBookView *object, return; /* array contains both UID and vcard */ - for (p = vcards; *p; p += 2) { + for (p = vcards; p[0] && p[1]; p += 2) { contacts = g_slist_prepend (contacts, e_contact_new_from_vcard_with_uid (p[0], p[1])); } contacts = g_slist_reverse (contacts);