From 415aaf5e62e8ac4ba423a72179625180503f8223 Mon Sep 17 00:00:00 2001 From: Nathan Date: Mon, 22 Oct 2018 15:47:26 -0400 Subject: [PATCH] one line calldata bugfix - four line version --- mythril/laser/ethereum/state.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/mythril/laser/ethereum/state.py b/mythril/laser/ethereum/state.py index a6456674..19487615 100644 --- a/mythril/laser/ethereum/state.py +++ b/mythril/laser/ethereum/state.py @@ -64,7 +64,11 @@ class Calldata: def __getitem__(self, item): if isinstance(item, slice): - stop = get_concrete_int(item.stop) + try: + stop = get_concrete_int(item.stop) + except AttributeError: + stop = item.stop + if self.concrete and isinstance(stop, int): calldatasize = get_concrete_int(self.calldatasize) if stop > calldatasize: