diff --git a/manticore/platforms/evm.py b/manticore/platforms/evm.py index 5d4944d..9c3337b 100644 --- a/manticore/platforms/evm.py +++ b/manticore/platforms/evm.py @@ -1660,7 +1660,7 @@ class EVM(Eventful): self._consume(GCOPY * ceil32(size) // 32) for i in range(size): - if (code_offset + i > len(self.bytecode)): + if code_offset + i >= len(self.bytecode): self._store(mem_offset + i, 0) else: self._store(mem_offset + i, Operators.ORD(self.bytecode[code_offset + i])) diff --git a/tests/binaries/780.sol b/tests/binaries/780.sol new file mode 100644 index 0000000..dd3d7be --- /dev/null +++ b/tests/binaries/780.sol @@ -0,0 +1,5 @@ +contract C { + function C(bool x) { + return; + } +} diff --git a/tests/test_binaries.py b/tests/test_binaries.py index a4c8aea..9ceb96a 100644 --- a/tests/test_binaries.py +++ b/tests/test_binaries.py @@ -128,7 +128,7 @@ class IntegrationTest(unittest.TestCase): self.assertTrue(len(actual) > 100 ) def test_eth_regressions(self): - contracts = [676, 678, 701, 714, 735, 760] + contracts = [676, 678, 701, 714, 735, 760, 780] for contract in contracts: self._simple_cli_run('{}.sol'.format(contract))