Skip to content

Commit

Permalink
Merge pull request #1501 from volatilityfoundation/issue_1484_printke…
Browse files Browse the repository at this point in the history
…y_traceback

Windows Registry: Catch RegistryInvalidIndex
  • Loading branch information
ikelos authored Jan 1, 2025
2 parents 6d0d9c4 + fa67f10 commit 9a4ec65
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion volatility3/framework/layers/registry.py
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,13 @@ def get_node(self, cell_offset: int) -> "objects.StructType":
"""Returns the appropriate Node, interpreted from the Cell based on its
Signature."""
cell = self.get_cell(cell_offset)
signature = cell.cast("string", max_length=2, encoding="latin-1")
try:
signature = cell.cast("string", max_length=2, encoding="latin-1")
except (RegistryInvalidIndex, exceptions.InvalidAddressException):
vollog.debug(
f"Failed to get cell signature for cell (0x{cell.vol.offset:x})"
)
return cell
if signature == "nk":
return cell.u.KeyNode
elif signature == "sk":
Expand Down

0 comments on commit 9a4ec65

Please sign in to comment.