Add SB Curated (copied from the smartbugs repository).
This commit is contained in:
19
dataset/arithmetic/integer_overflow_add.sol
Normal file
19
dataset/arithmetic/integer_overflow_add.sol
Normal file
@@ -0,0 +1,19 @@
|
||||
/*
|
||||
* @source: https://github.com/ConsenSys/evm-analyzer-benchmark-suite/blob/master/benchmarks/integer_overflow_add.sol
|
||||
* @author: -
|
||||
* @vulnerable_at_lines: 17
|
||||
*/
|
||||
|
||||
//Single transaction overflow
|
||||
//Post-transaction effect: overflow escapes to publicly-readable storage
|
||||
|
||||
pragma solidity ^0.4.19;
|
||||
|
||||
contract IntegerOverflowAdd {
|
||||
uint public count = 1;
|
||||
|
||||
function run(uint256 input) public {
|
||||
// <yes> <report> ARITHMETIC
|
||||
count += input;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user