From b2e836464694b8cf0e069e26430b767873e4cba6 Mon Sep 17 00:00:00 2001 From: Mike Auty Date: Tue, 10 Jun 2025 15:59:22 +0100 Subject: [PATCH] Windows: Fix pe_symbols type checking --- volatility3/framework/plugins/windows/pe_symbols.py | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/volatility3/framework/plugins/windows/pe_symbols.py b/volatility3/framework/plugins/windows/pe_symbols.py index 00c6fd868..b21e39a8c 100644 --- a/volatility3/framework/plugins/windows/pe_symbols.py +++ b/volatility3/framework/plugins/windows/pe_symbols.py @@ -709,17 +709,15 @@ class PESymbols(interfaces.plugins.PluginInterface): # symbol_info will be a symbol name or address requested for symbol_info in wanted_symbols: - if ( - wanted_type == wanted_names_identifier - and type(symbol_info) not in valid_name_types + if wanted_type == wanted_names_identifier and not isinstance( + symbol_info, tuple(valid_name_types) ): raise ValueError( f"The requested symbol name has a type of {type(symbol_info)} which is not in the allowed set of {valid_name_types}" ) - elif ( - wanted_type == wanted_addresses_identifier - and type(symbol_info) not in valid_address_types + elif wanted_type == wanted_addresses_identifier and not isinstance( + symbol_info, tuple(valid_address_types) ): raise ValueError( f"The requested address has a type of {type(symbol_info)} which is not in the allowed set of {valid_address_types}"