Skip to content

Commit 2415e98

Browse files
committed
Fix display_type() issue for .write attribute in volshell, or other fuctions
Previously, `getattr(volobject, member)` in `display_type()` would incorrectly retrieve method references (e.g., `.write`) instead of the intended object addresses, causing an `AttributeError` when `_display_value()` attempted to access `.vol.offset`. This commit replaces `getattr(volobject, member)` with `volobject.member(member)`, ensuring that the correct object address is retrieved instead of method references. Fixes: #1705
1 parent 82e1813 commit 2415e98

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

volatility3/cli/volshell/generic.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -503,7 +503,7 @@ def display_type(
503503
if isinstance(volobject, interfaces.objects.ObjectInterface):
504504
# We're an instance, so also display the data
505505
try:
506-
value = self._display_value(getattr(volobject, member))
506+
value = self._display_value(volobject.member(member))
507507
except exceptions.InvalidAddressException:
508508
value = self._display_value(renderers.NotAvailableValue())
509509
print(

0 commit comments

Comments
 (0)