solidity/test/libsolidity/smtCheckerTests/out_of_bounds/array_3.sol
2022-04-01 23:41:18 -05:00

11 lines
314 B
Solidity

contract C {
uint[] a;
function r(uint i) public view returns (uint) {
return a[i]; // oob access
}
}
// ====
// SMTEngine: all
// ----
// Warning 6368: (82-86='a[i]'): CHC: Out of bounds access happens here.\nCounterexample:\na = []\ni = 0\n = 0\n\nTransaction trace:\nC.constructor()\nState: a = []\nC.r(0)