diff options
author | Patrik Flykt <patrik.flykt@linux.intel.com> | 2013-05-22 12:21:36 +0300 |
---|---|---|
committer | Patrik Flykt <patrik.flykt@linux.intel.com> | 2013-05-22 13:18:52 +0300 |
commit | 7cd13920d00abbb4b19e64fa13f5ebed80c04a37 (patch) | |
tree | f3e05d8624443839de66ea99cb17abe36e7a4df8 /client | |
parent | 9e004ba689534442d8b4738d41a9cf591cd38c87 (diff) | |
download | connman-7cd13920d00abbb4b19e64fa13f5ebed80c04a37.tar.gz connman-7cd13920d00abbb4b19e64fa13f5ebed80c04a37.tar.bz2 connman-7cd13920d00abbb4b19e64fa13f5ebed80c04a37.zip |
client: Fix minor issues in D-Bus path name checking
Diffstat (limited to 'client')
-rw-r--r-- | client/commands.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/client/commands.c b/client/commands.c index 8c67ebc6..bd33284d 100644 --- a/client/commands.c +++ b/client/commands.c @@ -73,10 +73,11 @@ static bool check_dbus_name(const char *name) */ unsigned int i; - if (name == NULL || (name[0] >= '0' && name[0] <= '9')) + if (name == NULL || name[0] == '\0' || (name[0] >= '0' && + name[0] <= '9')) return false; - for (i = 0; i < strlen(name); i++) + for (i = 0; name[i] != '\0'; i++) if (!((name[i] >= 'A' && name[i] <= 'Z') || (name[i] >= 'a' && name[i] <= 'z') || (name[i] >= '0' && name[i] <= '9') || |