File tree Expand file tree Collapse file tree 2 files changed +12
-3
lines changed
volatility3/framework/plugins/linux Expand file tree Collapse file tree 2 files changed +12
-3
lines changed Original file line number Diff line number Diff line change @@ -281,7 +281,7 @@ def get_superblocks(
281281
282282 if sb_ptr in seen_sb_ptr :
283283 continue
284- seen_sb_ptr .add (sb_ptr )
284+ seen_sb_ptr .add (int ( sb_ptr ) )
285285
286286 superblock = sb_ptr .dereference ()
287287
Original file line number Diff line number Diff line change @@ -283,9 +283,14 @@ def get_inodes(
283283 continue
284284
285285 # Inode already processed?
286+ # Store a primitive int (instead of the pointer value) to track
287+ # addresses we've already seen. Storing the full `objects.Pointer`
288+ # uses too much memory, and we don't need all of the information
289+ # that it contains.
286290 if root_inode_ptr in seen_inodes :
287291 continue
288- seen_inodes .add (root_inode_ptr )
292+
293+ seen_inodes .add (int (root_inode_ptr ))
289294
290295 root_path = mountpoint
291296
@@ -318,9 +323,13 @@ def get_inodes(
318323 continue
319324
320325 # Inode already processed?
326+ # Store a primitive int (instead of the pointer value) to track
327+ # addresses we've already seen. Storing the full `objects.Pointer`
328+ # uses too much memory, and we don't need all of the information
329+ # that it contains.
321330 if file_inode_ptr in seen_inodes :
322331 continue
323- seen_inodes .add (file_inode_ptr )
332+ seen_inodes .add (int ( file_inode_ptr ) )
324333
325334 if follow_symlinks :
326335 file_path = cls ._follow_symlink (file_inode_ptr , file_path )
You can’t perform that action at this time.
0 commit comments