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

Lack of overflow-checks=true in contracts #358

Closed
tkowalczyk opened this issue Jul 27, 2021 · 3 comments
Closed

Lack of overflow-checks=true in contracts #358

tkowalczyk opened this issue Jul 27, 2021 · 3 comments

Comments

@tkowalczyk
Copy link

I am wondering why in the for example cw-20 contract in Cargo.toml file the flag overflow-checks is not set to true this is important from security perspective.

@ethanfrey
Copy link
Member

ethanfrey commented Jul 28, 2021

It is important.

However, you cannot set the profile inside the individual workspace, but rather in the global space.

We do set it here: https://github.com/CosmWasm/cosmwasm-plus/blob/main/Cargo.toml#L63

(Add have other blocks to add some compiler flags for contracts to get deterministic builds, that we don't need for packages)

@ethanfrey
Copy link
Member

It is also set in the template contract. https://github.com/CosmWasm/cosmwasm-template/blob/master/Cargo.toml#L27

I agree it is quite important. Even if the Uint128 type now checks in code as well to be more robust against someone forgetting such a flag.

@tkowalczyk
Copy link
Author

Thank you @ethanfrey for clarification 👍

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

No branches or pull requests

2 participants