Skip to content
This repository was archived by the owner on May 16, 2025. It is now read-only.

Commit e2712e5

Browse files
committed
Mac - protect against list_files smearing
1 parent 1e2a985 commit e2712e5

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

volatility/plugins/mac/list_files.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ def list_files(config):
112112

113113
entry = [str(name), par_offset, parent]
114114
vnodes[parent.obj_offset] = entry
115-
115+
116116
parent = next_parent
117117

118118
## build the full paths for all directories
@@ -132,7 +132,11 @@ def list_files(config):
132132
full_path = parent_vnodes[parent] + "/" + name
133133
else:
134134
paths = [name]
135-
while parent:
135+
seen_subs = set()
136+
137+
while parent and parent not in seen_subs:
138+
seen_subs.add(parent)
139+
136140
entry = vnodes.get(parent)
137141

138142
## a vnode's parent wasn't found or

0 commit comments

Comments
 (0)