Skip to content

Commit

Permalink
Revert "Let's not add a constraint on the size, on CALLDATACOPY"
Browse files Browse the repository at this point in the history
This reverts commit 499c84d.
  • Loading branch information
palkeo committed Mar 24, 2019
1 parent c01d1cd commit b630f47
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions pakala/sm.py
Original file line number Diff line number Diff line change
Expand Up @@ -477,8 +477,7 @@ def solution(variable):
self.add_for_fuzzing(old_state, size, CALLDATACOPY_SIZE_FUZZ)
return False
state.memory.copy_from(state.env.calldata, mstart, dstart, size)
# We don't add a constraint on the size here. We can copy something
# out of bound, it's fine. See consensys diligence ROP EVM challenge.
state.solver.add(state.env.calldata_size >= dstart + size)
elif op == opcode_values.CODESIZE:
state.stack_push(bvv(len(self.code)))
elif op == opcode_values.EXTCODESIZE:
Expand Down

0 comments on commit b630f47

Please sign in to comment.