Skip to content

Commit

Permalink
use minimum string length 4
Browse files Browse the repository at this point in the history
  • Loading branch information
mr-tz committed Jan 11, 2023
1 parent ffef4a2 commit ca9c940
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions capa/features/extractors/viv/insn.py
Original file line number Diff line number Diff line change
Expand Up @@ -670,11 +670,12 @@ def extract_op_string_features(

for v in derefs(f.vw, v):
try:
s = read_string(f.vw, v)
s = read_string(f.vw, v).rstrip("\x00")
except ValueError:
continue
else:
yield String(s.rstrip("\x00")), ih.address
if len(s) > 4:
yield String(s), ih.address


def extract_operand_features(f: FunctionHandle, bb, insn: InsnHandle) -> Iterator[Tuple[Feature, Address]]:
Expand Down

0 comments on commit ca9c940

Please sign in to comment.