Skip to content

Commit

Permalink
sequence: documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
williballenthin committed Dec 16, 2024
1 parent 58f42f5 commit 69f4728
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions capa/capabilities/dynamic.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,12 @@
import collections
from dataclasses import dataclass

from capa.features.address import NO_ADDRESS
import capa.perf
import capa.features.freeze as frz
import capa.render.result_document as rdoc
from capa.rules import Scope, RuleSet
from capa.engine import FeatureSet, MatchResults
from capa.features.common import Feature
from capa.features.address import _NoAddress
from capa.capabilities.common import Capabilities, find_file_capabilities
from capa.features.extractors.base_extractor import CallHandle, ThreadHandle, ProcessHandle, DynamicFeatureExtractor

Expand Down Expand Up @@ -126,9 +125,10 @@ def find_thread_capabilities(
if len(sequence_feature_sets) == SEQUENCE_SIZE:
overflowing_feature_set = sequence_feature_sets.popleft()

# these are the top-level features that will no longer have any associated addresses.
for feature, vas in overflowing_feature_set.items():
if vas == { NO_ADDRESS, }:
if len(vas) == 1 and isinstance(next(iter(vas)), _NoAddress):
# `vas == { NO_ADDRESS }` without the garbage.
#
# ignore the common case of global features getting added/removed/trimmed repeatedly,
# like arch/os/format.
continue
Expand Down

0 comments on commit 69f4728

Please sign in to comment.