Closed sunbeomso closed 4 years ago
These are internal overflows(mostly unrelated to user input), Sometimes solidity causes intentional overflows that are safe.
Interesting. Could you provide any related links?
Could you provide any related links?
I don't have any links as I observed it when I was going through the bytecode. For example if the stack has [value]
, and you need to compute value-1
, then it's cheaper to do PUSH UINT_MAX, ADD
than PUSH 1, SWAP, SUB
and solidity chooses the former. There are also other scenarios for overflows
@norhh thank you for explaining that.
Description
For the contract in: https://etherscan.io/address/0xcd2ddec1150ded7a28834169683a0dbc93a782c2#code
Mythril reports the following function has overflow (line 271--274):
Could you check the Mythril's result?
How to Reproduce
Expected behavior
Should not report overflow for string assignments.
Environment