Report out of bounds index access

This commit is contained in:
Leonardo Alt
2021-03-30 10:28:48 +02:00
parent 2346ec1c0c
commit dbd067d6db
208 changed files with 1619 additions and 608 deletions
@@ -4,15 +4,17 @@ contract C
{
uint[] a;
function f(bool b) public {
a.push();
a.push();
a.push();
a[2] = 3;
require(b);
if (b)
delete a;
else
delete a[2];
assert(a[2] == 0);
assert(a[1] == 0);
assert(a.length == 0);
}
}
// ----
// Warning 6838: (118-119): BMC: Condition is always true.
// Warning 6838: (154-155): BMC: Condition is always true.