Commit a10cb3c8 authored by Tim Montague's avatar Tim Montague Committed by David Gibson
Browse files

Fix get_node_by_path string equality check



When determining if to recurse into a node, get_node_by_path does not
check if the length of each node name is equal.  If searching for
/foo/baz, this can result in recursing into /foobar because
strneq("foo", "foobar", 3) is true.

This can result in a reference to /foo/baz to be incorrectly set to
/foobar/baz.  A test for this was added.

Signed-off-by: default avatarTim Montague <tmontague@ghs.com>
Signed-off-by: default avatarDavid Gibson <david@gibson.dropbear.id.au>
parent 548aea2c
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment