From aef03b55922a73ea2c80264b9a65305a943944c4 Mon Sep 17 00:00:00 2001 From: William Ballenthin Date: Fri, 20 Aug 2021 15:00:06 -0600 Subject: [PATCH] elf: fix type error caught by mypy! --- 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 2e068b83..0dd02685 100644 --- a/capa/features/extractors/elf.py +++ b/capa/features/extractors/elf.py @@ -241,7 +241,7 @@ def detect_elf_arch(f: BinaryIO) -> str: if not file_header.startswith(b"\x7fELF"): raise CorruptElfFile("missing magic header") - ei_data = struct.unpack_from("BB", file_header, 5) + (ei_data,) = struct.unpack_from("B", file_header, 5) logger.debug("ei_data: 0x%02x", ei_data) if ei_data == 1: