FISCO-BCOS / FISCO-BCOS/SCStudio

number can be overflow when use "**"

Open
#4 0 comments 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
Python
Stars
23
Forks
9
PR merge metrics
No merged PRs in 30d

Description

in the following contract, the field "number" can be overflow when use function setnumber. And in the report, it doesn't find this issue

```
contract HelloWorld {
string name;
uint8 number;

constructor() public {
name = "Hello, World!";
}

function get() public view returns (string memory) {
return name;
}

function set(string memory n) public {
name = n;
}

function setnumber() public {
number = number ** 22;
}
}
```

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.