From 737fab7969b415ae0550f0ed361bcf74e8a40577 Mon Sep 17 00:00:00 2001 From: Willi Ballenthin Date: Mon, 14 Aug 2023 16:40:45 +0200 Subject: [PATCH] elf: use equality not bit masking --- capa/features/extractors/elf.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/capa/features/extractors/elf.py b/capa/features/extractors/elf.py index 62846ea8..f9558c1b 100644 --- a/capa/features/extractors/elf.py +++ b/capa/features/extractors/elf.py @@ -718,7 +718,7 @@ class SymTab: SHT_SYMTAB = 0x2 for section in elf.sections: - if section.sh_type & SHT_SYMTAB: + if section.sh_type == SHT_SYMTAB: strtab_section = elf.sections[section.sh_link] sh_symtab = Shdr.from_viv(section, elf.readAtOffset(section.sh_offset, section.sh_size)) sh_strtab = Shdr.from_viv(