Skip to content

Bound the address before narrowing it in mbusctl - #5

Merged
ichnograph merged 1 commit into
mainfrom
v1.1.0
Aug 1, 2026
Merged

Bound the address before narrowing it in mbusctl#5
ichnograph merged 1 commit into
mainfrom
v1.1.0

Conversation

@ichnograph

Copy link
Copy Markdown

Code scanning flagged the int to uint8 conversion in destinationAddr. The valid-range check did guarantee the value fits in a byte, but only through a disjunction, which static analysis cannot follow and which is fragile if the valid set ever changes. The conversion now happens after an explicit byte-range check.

The valid-range check guaranteed the value fits in a byte, but only
through a disjunction. An explicit byte-range check before the
conversion is robust against future edits to the valid set.
@ichnograph
ichnograph merged commit 97e315b into main Aug 1, 2026
12 checks passed
@ichnograph
ichnograph deleted the v1.1.0 branch August 1, 2026 15:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant