Objects: Ensure templates objects aren't ReferenceTemplates.

This commit is contained in:
Mike Auty
2020-01-13 13:58:35 +00:00
parent b4a9937da7
commit 8a03cf53f0
@@ -13,6 +13,7 @@ import hashlib
from typing import Callable, Dict, Iterable, List, Optional, Set, Tuple, Union
from volatility.framework import constants, interfaces, symbols, exceptions
from volatility.framework.objects import templates
class Context(interfaces.context.ContextInterface):
@@ -104,6 +105,8 @@ class Context(interfaces.context.ContextInterface):
except exceptions.SymbolError:
object_template = self._symbol_space.get_enumeration(object_type)
else:
if isinstance(object_type, templates.ReferenceTemplate):
object_type = self._symbol_space.get_type(object_type.vol.type_name)
object_template = object_type
# Ensure that if a pre-constructed type is provided we just instantiate it
arguments.update(object_template.vol)