Skip to content
Discussion options

You must be logged in to vote

Thank you, @swarm59, for the precise report and the compiler diagnostic. You were exactly right: the generated bound check did not carry the member’s @optional state into the emitted expression, so it called .len() directly on an Option<String> and produced uncompilable Rust.

The direct failure is fixed on main in bd7e592. Bound checks for optional members are now guarded and applied only when a value is present, on both the encode and decode paths.

Your report led us into two substantially broader audits.

First, we found that the decoder side often checked only whether enough bytes remained in the input buffer, but did not enforce the bound declared by the IDL type itself. A well-formed …

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by SandraK82
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants