[telepathy-glib/master] TpConnectionManager: improve validation of object paths from .manager files
Simon McVittie
simon.mcvittie at collabora.co.uk
Wed Jun 10 03:55:12 PDT 2009
---
telepathy-glib/connection-manager.c | 9 ++++++---
1 files changed, 6 insertions(+), 3 deletions(-)
diff --git a/telepathy-glib/connection-manager.c b/telepathy-glib/connection-manager.c
index e6b110d..5da42e3 100644
--- a/telepathy-glib/connection-manager.c
+++ b/telepathy-glib/connection-manager.c
@@ -896,10 +896,13 @@ parse_default_value (GValue *value,
case 'o':
s = g_key_file_get_string (file, group, key, NULL);
- g_value_take_boxed (value, s);
+ if (s == NULL || !tp_dbus_check_valid_object_path (s, NULL))
+ {
+ g_free (s);
+ return FALSE;
+ }
- if (s[0] != '/')
- return FALSE;
+ g_value_take_boxed (value, s);
return TRUE;
--
1.5.6.5
More information about the telepathy-commits
mailing list