Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[feature] #2004: Forbid isize and usize from becoming IntoSchema. #2173

Merged
merged 1 commit into from May 6, 2022

Conversation

appetrosyan
Copy link
Contributor

Signed-off-by: Aleksandr Petrosyan a-p-petrosyan@yandex.ru

Description of the Change

Add a unit test that fails when usize/isize are Encode/Decode/IntoSchema

Issue

Closes #2004

Benefits

Impossible to add structures which utilise usize, isize inside the schema, and thus cause UB in decoding if the pointer size on the host machine is smaller than the encoded integer.

Possible Drawbacks

None

Usage Examples or Tests [optional]

cargo test -p iroha_schema --test architecture-dependent

@github-actions github-actions bot added the iroha2-dev The re-implementation of a BFT hyperledger in RUST label May 2, 2022
@appetrosyan appetrosyan force-pushed the i2-usize-ban branch 2 times, most recently from 7bc1682 to b5f83d1 Compare May 5, 2022 09:23
@appetrosyan appetrosyan marked this pull request as ready for review May 5, 2022 09:54
@mversic mversic self-assigned this May 5, 2022
@Arjentix Arjentix self-assigned this May 6, 2022
…`IntoSchema`.

Signed-off-by: Aleksandr Petrosyan <a-p-petrosyan@yandex.ru>
@appetrosyan appetrosyan merged commit 4f03342 into hyperledger:iroha2-dev May 6, 2022
@appetrosyan appetrosyan deleted the i2-usize-ban branch May 6, 2022 07:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
iroha2-dev The re-implementation of a BFT hyperledger in RUST
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants