Changeset df147c7 in mainline


Ignore:
Timestamp:
2011-03-28T20:41:51Z (13 years ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
0418050
Parents:
dc87f3fd
git-author:
Vojtech Horky <> (2011-03-28 20:41:51)
git-committer:
Jiri Svoboda <jiri@…> (2011-03-28 20:41:51)
Message:

Reject relative paths in devman find_fun_node_by_path().

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/srv/devman/devman.c

    rdc87f3fd rdf147c7  
    11241124fun_node_t *find_fun_node_by_path(dev_tree_t *tree, char *path)
    11251125{
     1126        assert(path != NULL);
     1127
     1128        bool is_absolute = path[0] == '/';
     1129        if (!is_absolute) {
     1130                return NULL;
     1131        }
     1132
    11261133        fibril_rwlock_read_lock(&tree->rwlock);
    11271134       
     
    11331140        char *rel_path = path;
    11341141        char *next_path_elem = NULL;
    1135         bool cont = (rel_path[0] == '/');
     1142        bool cont = true;
    11361143       
    11371144        while (cont && fun != NULL) {
Note: See TracChangeset for help on using the changeset viewer.