Correctly pass constructor arguments through the template's vol dictionary.

This commit is contained in:
Mike Auty
2015-01-05 18:39:59 +00:00
parent cadb761f67
commit c163101e17
+5 -4
View File
@@ -87,7 +87,7 @@ class Context(interfaces.context.ContextInterface):
# ## Object Factory Functions
def object(self, symbol, layer_name, offset, **kwargs):
def object(self, symbol, layer_name, offset, **arguments):
"""Object factory, takes a context, symbol, offset and optional layername
Looks up the layername in the context, finds the object template based on the symbol,
@@ -97,9 +97,10 @@ class Context(interfaces.context.ContextInterface):
:rtype: :py:class:`volatility.framework.interfaces.objects.ObjectInterface`
"""
object_template = self._symbol_space.get_structure(symbol)
return object_template(self,
interfaces.objects.ObjectInformation(layer_name = layer_name, offset = offset),
**kwargs)
object_template.update_vol(**arguments)
return object_template(context = self,
object_info = interfaces.objects.ObjectInformation(layer_name = layer_name,
offset = offset))