smartbugs-curated/dataset/arithmetic/integer_overflow_multitx_on...

25 lines
552 B
Solidity
Raw Normal View History

/*
* @source: https://github.com/ConsenSys/evm-analyzer-benchmark-suite
* @author: Suhabe Bugrara
* @vulnerable_at_lines: 22
*/
//Multi-transactional, single function
//Arithmetic instruction reachable
pragma solidity ^0.4.23;
contract IntegerOverflowMultiTxOneFuncFeasible {
uint256 private initialized = 0;
uint256 public count = 1;
function run(uint256 input) public {
if (initialized == 0) {
initialized = 1;
return;
}
// <yes> <report> ARITHMETIC
count -= input;
}
}