mirror of
https://github.com/volatilityfoundation/volatility3.git
synced 2026-09-10 03:37:39 +02:00
Fix uncheck read() call and remove variable that would not be definied if exception triggers
This commit is contained in:
@@ -289,7 +289,7 @@ class Skeleton_Key_Check(interfaces.plugins.PluginInterface):
|
||||
|
||||
except exceptions.InvalidAddressException as excp:
|
||||
vollog.debug(
|
||||
f"Process {proc_id}: invalid address {excp.invalid_address} in layer {excp.layer_name}"
|
||||
f"Invalid address {excp.invalid_address} in layer {excp.layer_name}"
|
||||
)
|
||||
|
||||
return None, None
|
||||
@@ -431,15 +431,20 @@ class Skeleton_Key_Check(interfaces.plugins.PluginInterface):
|
||||
|
||||
# we do not want to fail just because the count is not in memory
|
||||
# 16 was the size on samples I tested, so I chose it as the default
|
||||
count = 16
|
||||
|
||||
if target_address:
|
||||
count = int.from_bytes(
|
||||
self.context.layers[proc_layer_name].read(
|
||||
target_address, 4
|
||||
),
|
||||
"little",
|
||||
)
|
||||
else:
|
||||
count = 16
|
||||
try:
|
||||
count = int.from_bytes(
|
||||
self.context.layers[proc_layer_name].read(
|
||||
target_address, 4
|
||||
),
|
||||
"little",
|
||||
)
|
||||
except exceptions.InvalidAddressException:
|
||||
vollog.debug(
|
||||
"Unable to read `cCsystems`. Defaulting to 16."
|
||||
)
|
||||
|
||||
found_count = True
|
||||
|
||||
|
||||
Reference in New Issue
Block a user