From 695b5b50ab974e072f20cee1da8efc4b64cf1a39 Mon Sep 17 00:00:00 2001 From: Ana Maria Martinez Gomez Date: Tue, 2 Mar 2021 12:03:20 +0100 Subject: [PATCH] Remove va not None check Instead of checking if `va` is `None in `get_section()` we should avoid calling this function with `None`. This have been fixed in the following PR, so this is not longer needed: https://github.com/fireeye/capa/pull/442 --- capa/features/extractors/viv/insn.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/capa/features/extractors/viv/insn.py b/capa/features/extractors/viv/insn.py index 511d6fca..6321fcab 100644 --- a/capa/features/extractors/viv/insn.py +++ b/capa/features/extractors/viv/insn.py @@ -488,7 +488,7 @@ def extract_insn_segment_access_features(f, bb, insn): def get_section(vw, va): for start, length, _, __ in vw.getMemoryMaps(): - if va and start <= va < start + length: + if start <= va < start + length: return start raise KeyError(va)