From 0599ec8f36b382001e5c3fae9df70fc3670de7e6 Mon Sep 17 00:00:00 2001 From: Mike Auty Date: Sun, 3 Sep 2017 23:17:07 +0100 Subject: [PATCH] Slightly improve potential error condition. --- volatility/framework/contexts/__init__.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/volatility/framework/contexts/__init__.py b/volatility/framework/contexts/__init__.py index 917f3cf3d..618e849ec 100644 --- a/volatility/framework/contexts/__init__.py +++ b/volatility/framework/contexts/__init__.py @@ -143,6 +143,9 @@ class Module(interfaces.context.Module): if constants.BANG in type_name: raise ValueError("Type_name cannot reference another module") type_arg = self._module_name + constants.BANG + type_name + # Ensure we don't use a layer_name other than the module's, why would anyone do that? + if 'layer_name' in kwargs: + del kwargs['layer_name'] return self._context.object(type_arg, self._layer_name, offset, **kwargs) get_symbol = get_module_wrapper('get_symbol')