smartbugs-curated/dataset/arithmetic/integer_overflow_mapping_sy...

19 lines
453 B
Solidity
Raw Normal View History

/*
* @source: https://github.com/SmartContractSecurity/SWC-registry/blob/master/test_cases/integer_overflow_and_underflow/integer_overflow_mapping_sym_1.sol
* @author: -
* @vulnerable_at_lines: 16
*/
//Single transaction overflow
pragma solidity ^0.4.11;
contract IntegerOverflowMappingSym1 {
mapping(uint256 => uint256) map;
function init(uint256 k, uint256 v) public {
// <yes> <report> ARITHMETIC
map[k] -= v;
}
}