Skip to content

Commit ad1da57

Browse files
authored
Merge pull request #1926 from volatilityfoundation/issues/issue1309
Avoid trying to lookup child nodes that have been filtered
2 parents ade1cf2 + 0089aef commit ad1da57

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

volatility3/cli/text_renderer.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@
1010
import sys
1111
from functools import wraps
1212
from typing import Any, Callable, Dict, List, Optional, Set, Tuple, TypeVar, Union
13-
from volatility3.cli import text_filter
1413

14+
from volatility3.cli import text_filter
1515
from volatility3.framework import exceptions, interfaces, renderers
1616
from volatility3.framework.renderers import format_hints
1717

@@ -598,7 +598,8 @@ def visitor(
598598
if self.filter and self.filter.filter(line):
599599
return accumulator
600600

601-
if node.parent:
601+
# Only add if the parent hasn't been filtered out
602+
if node.parent and node.parent.path in acc_map:
602603
acc_map[node.parent.path]["__children"].append(node_dict)
603604
else:
604605
final_tree.append(node_dict)

0 commit comments

Comments
 (0)