From 792fb7080c9ce0230e6638f590bcd0727a92a09d Mon Sep 17 00:00:00 2001 From: Mike Auty Date: Thu, 7 Jan 2021 23:23:40 +0000 Subject: [PATCH] Symbols: Set symbol_shift default rather than None Since all the checks for symbol_shift use essentially "if not config['symbol_shift']" is doesn't matter whether 0 or None is returned. I'd like to test this on an ASLR image, but I think it should be fine and I'd feel much happier about everything if we could give it a numeric default. --- volatility3/framework/interfaces/symbols.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/volatility3/framework/interfaces/symbols.py b/volatility3/framework/interfaces/symbols.py index ba43b95a2..c1185bed9 100644 --- a/volatility3/framework/interfaces/symbols.py +++ b/volatility3/framework/interfaces/symbols.py @@ -303,7 +303,8 @@ class SymbolTableInterface(BaseSymbolTableInterface, configuration.ConfigurableI @classmethod def get_requirements(cls) -> List[RequirementInterface]: return super().get_requirements() + [ - requirements.IntRequirement(name = 'symbol_shift', description = 'Symbol Shift', optional = True), + requirements.IntRequirement( + name = 'symbol_shift', description = 'Symbol Shift', optional = True, default = 0), requirements.IntRequirement( name = 'symbol_mask', description = 'Address mask for symbols', optional = True, default = 0), ]