From f060e3b8aea71ee8b32f607e5c8cad41d12dc331 Mon Sep 17 00:00:00 2001 From: eve Date: Fri, 28 Mar 2025 12:42:24 +0000 Subject: [PATCH] Fix type check for pointer detection in volshell Replaced `member_type.vol.object_class == objects.Pointer` with `isinstance(member_type, objects.Pointer)` to identify pointer types consistently. Thanks to @ikelos for the suggestion! --- volatility3/cli/volshell/generic.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/volatility3/cli/volshell/generic.py b/volatility3/cli/volshell/generic.py index 4ebda12a2..cc8027ddd 100644 --- a/volatility3/cli/volshell/generic.py +++ b/volatility3/cli/volshell/generic.py @@ -399,7 +399,7 @@ class Volshell(interfaces.plugins.PluginInterface): a pointer otherwise it returns just the normal type name.""" pointer_marker = "*" * depth try: - if member_type.vol.object_class == objects.Pointer: + if isinstance(member_type, objects.Pointer): sub_member_type = member_type.vol.subtype # follow at most MAX_DEREFERENCE_COUNT pointers. A guard against, hopefully unlikely, infinite loops if depth < MAX_DEREFERENCE_COUNT: