Fix off-by-one when iterating dir (#2530)
Fix https://github.com/tiann/KernelSU/issues/2528
This commit is contained in:
@@ -227,7 +227,7 @@ void search_manager(const char *path, int depth, struct list_head *uid_data)
|
||||
data.depth = depth;
|
||||
list_add_tail(&data.list, &data_path_list);
|
||||
|
||||
for (i = depth; i > 0; i--) {
|
||||
for (i = depth; i >= 0; i--) {
|
||||
struct data_path *pos, *n;
|
||||
|
||||
list_for_each_entry_safe(pos, n, &data_path_list, list) {
|
||||
|
||||
Reference in New Issue
Block a user