mirror of
https://github.com/volatilityfoundation/volatility3.git
synced 2026-08-17 20:35:40 +02:00
use dynamically_sized_array_of_pointers in _get_sect_count
This commit is contained in:
@@ -198,21 +198,17 @@ class module(generic.GenericIntelProcess):
|
||||
)
|
||||
return 0
|
||||
|
||||
entry = arr_offset.dereference()
|
||||
symbol_table_name = self.get_symbol_table_name()
|
||||
idx = 0
|
||||
while entry.is_readable():
|
||||
idx += 1
|
||||
entry = self._context.object(
|
||||
symbol_table_name + constants.BANG + "pointer",
|
||||
layer_name=self.vol.layer_name,
|
||||
offset=entry.vol.offset
|
||||
+ self._context.symbol_space.get_type(
|
||||
symbol_table_name + constants.BANG + "pointer"
|
||||
).size,
|
||||
)
|
||||
|
||||
return idx
|
||||
# We chose 1000 as an arbitrary guard value against
|
||||
# extreme cases of smearing.
|
||||
# See PR #1773 for more information.
|
||||
bin_attrs_list = utility.dynamically_sized_array_of_pointers(
|
||||
context=self._context,
|
||||
layer_name=self.vol.layer_name,
|
||||
symbol_table_name=self.get_symbol_table_name(),
|
||||
array_offset=arr_offset.dereference().vol.offset,
|
||||
iterator_guard_value=1000,
|
||||
)
|
||||
return len(bin_attrs_list)
|
||||
|
||||
@functools.cached_property
|
||||
def number_of_sections(self) -> int:
|
||||
|
||||
Reference in New Issue
Block a user