From a6830da67d0af30d44774879df1a9b06bf23641d Mon Sep 17 00:00:00 2001 From: Milan Crha Date: Tue, 18 Oct 2011 11:12:16 +0200 Subject: Fix invalid read on vCard drop --- addressbook/util/eab-book-util.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'addressbook') diff --git a/addressbook/util/eab-book-util.c b/addressbook/util/eab-book-util.c index 9839e5174f..eff5fc1058 100644 --- a/addressbook/util/eab-book-util.c +++ b/addressbook/util/eab-book-util.c @@ -106,7 +106,8 @@ eab_contact_list_from_string (const gchar *str) q += 9; temp = q; - temp += strspn (temp, "\r\n\t "); + if (*temp) + temp += strspn (temp, "\r\n\t "); if (*temp == '\0' || !g_ascii_strncasecmp (temp, "BEGIN:VCARD", 11)) break; /* Found the outer END:VCARD */ -- cgit v1.2.3 From 998b3d148ea7d47aed945b9ba74671b06e1d9dcf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dan=20Vr=C3=A1til?= Date: Thu, 20 Oct 2011 11:32:52 +0200 Subject: Bug #661409 - Contact display drops address lines Evo trets first line of a multi-line address field as a street name and the rest as "extended address", regardless of its content. The address-formatting code was ignoring the extended address, thus when the first line was for example a company name, the actual street was ignored. --- addressbook/gui/widgets/eab-gui-util.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'addressbook') diff --git a/addressbook/gui/widgets/eab-gui-util.c b/addressbook/gui/widgets/eab-gui-util.c index 09830a94ae..eb98676169 100644 --- a/addressbook/gui/widgets/eab-gui-util.c +++ b/addressbook/gui/widgets/eab-gui-util.c @@ -964,6 +964,9 @@ parse_address_template_section (const gchar *format, case 's': if (address->street && *(address->street)) { g_string_append (res, address->street); + if (address->ext && *(address->ext)) + g_string_append_printf (res, "\n%s", + address->ext); ret = TRUE; } pos += 2; @@ -971,6 +974,10 @@ parse_address_template_section (const gchar *format, case 'S': if (address->street && *(address->street)) { string_append_upper (res, address->street); + if (address->ext && *(address->ext)) { + g_string_append (res, "\n"); + string_append_upper (res, address->ext); + } ret = TRUE; } pos += 2; -- cgit v1.2.3