mirror of
https://github.com/volatilityfoundation/volatility3.git
synced 2026-08-17 20:35:40 +02:00
Merge pull request #1760 from volatilityfoundation/bugfix/volshell_dt_traceback
Fix traceback in volshell's `dt()`
This commit is contained in:
@@ -621,12 +621,15 @@ class Volshell(interfaces.plugins.PluginInterface):
|
||||
if isinstance(value, objects.Pointer):
|
||||
# show pointers in hex to match output for struct addrs
|
||||
# highlight null or unreadable pointers
|
||||
if value == 0:
|
||||
suffix = " (null pointer)"
|
||||
elif not value.is_readable():
|
||||
suffix = " (unreadable pointer)"
|
||||
else:
|
||||
suffix = ""
|
||||
try:
|
||||
if value == 0:
|
||||
suffix = " (null pointer)"
|
||||
elif not value.is_readable():
|
||||
suffix = " (unreadable pointer)"
|
||||
else:
|
||||
suffix = ""
|
||||
except exceptions.SymbolError as exc:
|
||||
suffix = f" (unknown sized {exc.symbol_name})"
|
||||
return f"{hex(value)}{suffix}"
|
||||
elif isinstance(value, objects.PrimitiveObject):
|
||||
return repr(value)
|
||||
|
||||
Reference in New Issue
Block a user