mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
11 lines
316 B
Solidity
11 lines
316 B
Solidity
|
pragma experimental SMTChecker;
|
||
|
|
||
|
contract C {
|
||
|
uint[] a;
|
||
|
function r(uint i) public view returns (uint) {
|
||
|
return a[i]; // oob access
|
||
|
}
|
||
|
}
|
||
|
// ----
|
||
|
// Warning 6368: (115-119): CHC: Out of bounds access happens here.\nCounterexample:\na = []\ni = 0\n = 0\n\nTransaction trace:\nC.constructor()\nState: a = []\nC.r(0)
|