Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@
- loader: skip PE files with unrealistically large section virtual sizes to prevent resource exhaustion @devs6186 #1989
- engine/render: fix unbounded range sentinel precedence so `count(...): N or more` uses explicit `((1 << 64) - 1)` @blenbot #2936
- cache: support *BSD @williballenthin @res2500 #2949
- freeze: support float `operand number` values in feature freeze conversion @blenbot #2957

### capa Explorer Web
- webui: fix 404 for "View rule in capa-rules" by using encodeURIComponent for rule name in URL @devs6186 #2482
Expand Down
4 changes: 2 additions & 2 deletions capa/features/freeze/features.py
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ def feature_from_capa(f: capa.features.common.Feature) -> "Feature":
return MnemonicFeature(mnemonic=f.value, description=f.description)

elif isinstance(f, capa.features.insn.OperandNumber):
assert isinstance(f.value, int)
assert isinstance(f.value, Union[int, float])
return OperandNumberFeature(index=f.index, operand_number=f.value, description=f.description) # type: ignore
# Mypy is unable to recognise `operand_number` as an argument due to alias

Expand Down Expand Up @@ -343,7 +343,7 @@ class MnemonicFeature(FeatureModel):
class OperandNumberFeature(FeatureModel):
type: Literal["operand number"] = "operand number"
index: int
operand_number: int = Field(alias="operand number")
operand_number: Union[int, float] = Field(alias="operand number")
description: Optional[str] = None


Expand Down
Loading