From e230bbf6a8ba4ebd6ebe2f620eb9307bcf22c6fb Mon Sep 17 00:00:00 2001 From: Mike Auty Date: Sun, 25 Dec 2016 00:02:11 +0000 Subject: [PATCH] Ensure we don't ever get in a loop looking up ._vol (could happen when pickling/unpickling). --- volatility/framework/interfaces/objects.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/volatility/framework/interfaces/objects.py b/volatility/framework/interfaces/objects.py index 9bb0dba68..4095ce9ac 100644 --- a/volatility/framework/interfaces/objects.py +++ b/volatility/framework/interfaces/objects.py @@ -176,8 +176,9 @@ class Template(validity.ValidityRoutines): def __getattr__(self, attr): """Exposes any other values stored in ._vol as attributes (for example, enumeration choices)""" - if attr in self._vol: - return self._vol[attr] + if attr != '_vol': + if attr in self._vol: + return self._vol[attr] raise AttributeError("{} object has no attribute {}".format(self.__class__.__name__, attr)) def __call__(self, context, object_info):