solidity/test/libsolidity/smtCheckerTests/out_of_bounds/fixed_bytes_2.sol
2021-04-08 21:03:39 +02:00

10 lines
297 B
Solidity

contract C {
function r(bytes4 x, uint y) public pure returns (bytes1) {
return x[y]; // oob access
}
}
// ====
// SMTEngine: all
// ----
// Warning 6368: (83-87): CHC: Out of bounds access happens here.\nCounterexample:\n\nx = 0\ny = 4\n = 0\n\nTransaction trace:\nC.constructor()\nC.r(0, 4)