From 68fcc03d5c6eea4d71679197c80dfaff6f0781bf Mon Sep 17 00:00:00 2001 From: Willi Ballenthin Date: Thu, 25 Feb 2021 13:34:59 -0700 Subject: [PATCH] viv: ignore empty branch targets but what does this really mean? why would `getBranches` return `None`? closes #441 --- capa/features/extractors/viv/insn.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/capa/features/extractors/viv/insn.py b/capa/features/extractors/viv/insn.py index e708ee47..addc7551 100644 --- a/capa/features/extractors/viv/insn.py +++ b/capa/features/extractors/viv/insn.py @@ -499,6 +499,9 @@ def extract_insn_cross_section_cflow(f, bb, insn): inspect the instruction for a CALL or JMP that crosses section boundaries. """ for va, flags in insn.getBranches(): + if va is None: + continue + if flags & envi.BR_FALL: continue