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