From 0f548e864c3fecaab9a9cae2f153c635580a348a Mon Sep 17 00:00:00 2001 From: Mike Auty Date: Sun, 18 Dec 2016 20:52:38 +0000 Subject: [PATCH] Add in comment in case of mutability trouble in the Struct TemplateProxy. --- volatility/framework/objects/__init__.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/volatility/framework/objects/__init__.py b/volatility/framework/objects/__init__.py index d553879e6..792569fda 100644 --- a/volatility/framework/objects/__init__.py +++ b/volatility/framework/objects/__init__.py @@ -401,6 +401,9 @@ class Struct(interfaces.objects.ObjectInterface): # but in case that ever changes, do the update correctly tmp_list = template.vol.members tmp_list[member] = (relative_offset, new_child) + # If there's trouble with mutability, consider making update_vol return a clone with the changes + # (there will be a few other places that will be necessary) and/or making these part of the + # permanent dictionaries rather than the non-clonable ones template.update_vol(members = tmp_list) @classmethod