[evolution-data-server/evolution-data-server-3-12] Bug #726788 - Crash on malformed vCard
- From: Milan Crha <mcrha src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution-data-server/evolution-data-server-3-12] Bug #726788 - Crash on malformed vCard
- Date: Mon, 24 Mar 2014 14:52:54 +0000 (UTC)
commit c79455a91b966ab0a80dc5f0e84aade61c8dba07
Author: Xavier Claessens <xavier claessens collabora com>
Date: Mon Mar 24 15:51:05 2014 +0100
Bug #726788 - Crash on malformed vCard
If the vcard is "END:VCARD" then the attribute is added to
the list, then freed. So next time we iterate on attributes it
will read freed memory and crash.
addressbook/libebook-contacts/e-vcard.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/addressbook/libebook-contacts/e-vcard.c b/addressbook/libebook-contacts/e-vcard.c
index cba32b8..cf2358c 100644
--- a/addressbook/libebook-contacts/e-vcard.c
+++ b/addressbook/libebook-contacts/e-vcard.c
@@ -763,7 +763,8 @@ parse (EVCard *evc,
e_vcard_attribute_free (attr);
attr = NULL;
} else if (attr) {
- if (!ignore_uid || g_ascii_strcasecmp (attr->name, EVC_UID) != 0)
+ if ((!ignore_uid || g_ascii_strcasecmp (attr->name, EVC_UID) != 0) &&
+ g_ascii_strcasecmp (attr->name, "end") != 0)
e_vcard_add_attribute (evc, attr);
}
while (*p) {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]