Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Operation parser: fix public key parsing
The parse_next_type function is used to parse a wire structure. It fills in nexttype_subparser_state.body using nexttype_subparser_state.body.raw, then casts the data with the expected type. To be able to parse a wire structure using this function, the structure must be in the body union. Otherwise, the parser may not have enough space to contain the entire structure. The largest structure in nexttype_subparser_state.body is operation_group_header (32 bytes), the nexttype_subparser_state.body can therefore contain a maximum of 32 bytes. As the size of the public key depends on the key curve, no fixed size structure was added to nexttype_subparser_state.body. But since a public key can contain 33 bytes, a byte was missed in nexttype_subparser_state.body. This commit adds a new structure to be able to parse the public key
- Loading branch information