Merge "Fix overflow in path building" into nyc-dev
am: c414027
* commit 'c414027e927fa025877afd53b27886b6c3b19cfd':
Fix overflow in path building
Change-Id: I6e2692539738d81055cc49a183a34261074e5e68
This commit is contained in:
commit
2a9dc6581f
|
@ -341,7 +341,7 @@ static ssize_t get_node_path_locked(struct node* node, char* buf, size_t bufsize
|
|||
|
||||
ssize_t pathlen = 0;
|
||||
if (node->parent && node->graft_path == NULL) {
|
||||
pathlen = get_node_path_locked(node->parent, buf, bufsize - namelen - 2);
|
||||
pathlen = get_node_path_locked(node->parent, buf, bufsize - namelen - 1);
|
||||
if (pathlen < 0) {
|
||||
return -1;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue