[evolution-data-server] Bug #707034 - vCard param value parsing too strict



commit d4c5b151fce97fd68eb11c5f42747fdcec8a74c5
Author: Milan Crha <mcrha redhat com>
Date:   Tue Sep 3 17:42:11 2013 +0200

    Bug #707034 - vCard param value parsing too strict

 addressbook/libebook-contacts/e-vcard.c |   10 +++++++---
 1 files changed, 7 insertions(+), 3 deletions(-)
---
diff --git a/addressbook/libebook-contacts/e-vcard.c b/addressbook/libebook-contacts/e-vcard.c
index ab0eafb..2654690 100644
--- a/addressbook/libebook-contacts/e-vcard.c
+++ b/addressbook/libebook-contacts/e-vcard.c
@@ -489,9 +489,13 @@ read_attribute_params (EVCardAttribute *attr,
                        }
                        if (colon)
                                break;
-               }
-               else {
-                       g_warning ("invalid character found in parameter spec");
+               } else if (param) {
+                       /* reading param value, which is SAFE-CHAR, aka
+                          any character except CTLs, DQUOTE, ";", ":", "," */
+                       g_string_append_unichar (str, g_utf8_get_char (lp));
+                       lp = g_utf8_next_char (lp);
+               } else {
+                       g_warning ("invalid character (%c/0x%02x) found in parameter spec (%s)", *lp, *lp, 
lp);
                        g_string_assign (str, "");
                        /*                      skip_until (&lp, ":;"); */
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]