diff options
Diffstat (limited to 'scripts/dtc/livetree.c')
-rw-r--r-- | scripts/dtc/livetree.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/scripts/dtc/livetree.c b/scripts/dtc/livetree.c index 3673de07e4e..aecd27875fd 100644 --- a/scripts/dtc/livetree.c +++ b/scripts/dtc/livetree.c @@ -478,7 +478,8 @@ struct node *get_node_by_path(struct node *tree, const char *path) p = strchr(path, '/'); for_each_child(tree, child) { - if (p && strneq(path, child->name, p-path)) + if (p && (strlen(child->name) == p-path) && + strneq(path, child->name, p-path)) return get_node_by_path(child, p+1); else if (!p && streq(path, child->name)) return child; |