From 116df8d166d89d7437b7862466a791ceecdbb3d4 Mon Sep 17 00:00:00 2001 From: Mike Auty Date: Tue, 22 Dec 2020 17:17:14 +0000 Subject: [PATCH] Objects: Avoid reconstructing pointed objects --- volatility3/framework/objects/__init__.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/volatility3/framework/objects/__init__.py b/volatility3/framework/objects/__init__.py index c3b4f9343..4660b14cc 100644 --- a/volatility3/framework/objects/__init__.py +++ b/volatility3/framework/objects/__init__.py @@ -3,6 +3,7 @@ # import collections +import functools import logging import struct from typing import Any, ClassVar, Dict, List, Iterable, Optional, Tuple, Type, Union as TUnion, overload @@ -307,6 +308,7 @@ class Pointer(Integer): value = int.from_bytes(data, byteorder = endian, signed = signed) return value & mask + @functools.lru_cache(3) def dereference(self, layer_name: Optional[str] = None) -> interfaces.objects.ObjectInterface: """Dereferences the pointer.