From 28c611fc0697e694e52b9c9431dcfc911d419dcf Mon Sep 17 00:00:00 2001 From: Nathan Date: Tue, 6 Nov 2018 08:30:54 -0500 Subject: [PATCH] fix calldata constraint --- mythril/laser/ethereum/state.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/mythril/laser/ethereum/state.py b/mythril/laser/ethereum/state.py index 649837ee..0c39fbf1 100644 --- a/mythril/laser/ethereum/state.py +++ b/mythril/laser/ethereum/state.py @@ -113,7 +113,9 @@ class Calldata: except IndexError: return BitVecVal(0, 8) else: - constraints = [Implies(item != 0, UGT(self.calldatasize, item))] + constraints = [ + Implies(self._calldata[item] != 0, UGT(self.calldatasize, item)) + ] self._not_yet_added_constraints += constraints return self._calldata[item]