From 5261da780b31b2e01c7dd0e8f135a7fb3983f0b6 Mon Sep 17 00:00:00 2001 From: Mike Auty Date: Mon, 18 Sep 2017 23:23:23 +0100 Subject: [PATCH] Allow the size of array to be changed (may override an existing count member). --- volatility/framework/objects/__init__.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/volatility/framework/objects/__init__.py b/volatility/framework/objects/__init__.py index b9a35f938..66544ffbe 100644 --- a/volatility/framework/objects/__init__.py +++ b/volatility/framework/objects/__init__.py @@ -331,6 +331,16 @@ class Array(interfaces.objects.ObjectInterface, abc.Sequence): self._vol['count'] = self._check_type(count, int) self._vol['subtype'] = subtype + @property + def count(self): + """Returns the count dynamically""" + return self._vol['count'] + + @count.setter + def count(self, value): + """Sets the count to a specific value""" + self._vol['count'] = self._check_type(value, int) + class VolTemplateProxy(interfaces.objects.ObjectInterface.VolTemplateProxy): @classmethod def size(cls, template):