From b4a9937da7f5761f6ad5a2767c255eb05c8ef8ec Mon Sep 17 00:00:00 2001 From: Mike Auty Date: Mon, 13 Jan 2020 02:16:35 +0000 Subject: [PATCH] Objects: Void has no size, and BitFields don't inherit from Integer. --- volatility/framework/objects/__init__.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/volatility/framework/objects/__init__.py b/volatility/framework/objects/__init__.py index 1dbf5e816..59f4c4fa5 100644 --- a/volatility/framework/objects/__init__.py +++ b/volatility/framework/objects/__init__.py @@ -72,7 +72,7 @@ class Void(interfaces.objects.ObjectInterface): @classmethod def size(cls, template: interfaces.objects.Template) -> int: """Dummy size for Void objects.""" - raise TypeError("Void types are incomplete, cannot contain data and do not have a size") + return 0 def write(self, value: Any) -> None: """Dummy method that does nothing for Void objects.""" @@ -384,7 +384,7 @@ class BitField(interfaces.objects.ObjectInterface, int): @classmethod def size(cls, template: interfaces.objects.Template) -> int: - return Integer.VolTemplateProxy.size(template) + return template.vol.base_type.size @classmethod def children(cls, template: interfaces.objects.Template) -> List[interfaces.objects.Template]: