mirror of
https://github.com/volatilityfoundation/volatility3.git
synced 2026-09-10 03:37:39 +02:00
Move the masking code into the data layer.
This commit is contained in:
@@ -6,7 +6,6 @@ Created on 6 May 2013
|
||||
|
||||
import collections
|
||||
import collections.abc
|
||||
import math
|
||||
from abc import ABCMeta, abstractmethod
|
||||
|
||||
from volatility.framework import validity
|
||||
@@ -69,7 +68,7 @@ class ObjectInterface(validity.ValidityRoutines, metaclass = ABCMeta):
|
||||
#
|
||||
|
||||
# Normalize offsets
|
||||
mask = (1 << int(math.ceil(math.log2(context.memory[object_info.layer_name].maximum_address)))) - 1
|
||||
mask = context.memory[object_info.layer_name].address_mask
|
||||
normalized_offset = object_info.offset & mask
|
||||
|
||||
self._vol = collections.ChainMap({}, object_info, {'type_name': type_name}, {'offset': normalized_offset},
|
||||
|
||||
Reference in New Issue
Block a user