diff --git a/mythril/analysis/modules/unchecked_retval.py b/mythril/analysis/modules/unchecked_retval.py index 678f329c..5aa8f005 100644 --- a/mythril/analysis/modules/unchecked_retval.py +++ b/mythril/analysis/modules/unchecked_retval.py @@ -116,13 +116,9 @@ class UncheckedRetvalModule(DetectionModule): assert state.environment.code.instruction_list[state.mstate.pc - 1][ "opcode" ] in ["CALL", "DELEGATECALL", "STATICCALL", "CALLCODE"] - retval = state.mstate.stack[-1] - # Use Typed Dict after release of mypy 0.670 and remove type ignore + return_value = state.mstate.stack[-1] retvals.append( - { # type: ignore - "address": state.instruction["address"] - 1, - "retval": retval, - } + {"address": state.instruction["address"] - 1, "retval": return_value} ) return [] diff --git a/mythril/laser/ethereum/state/calldata.py b/mythril/laser/ethereum/state/calldata.py index a8ebfa2b..f7fa0036 100644 --- a/mythril/laser/ethereum/state/calldata.py +++ b/mythril/laser/ethereum/state/calldata.py @@ -70,7 +70,7 @@ class BaseCalldata: try: current_index = ( start - if isinstance(start, Expression) + if isinstance(start, BitVec) else symbol_factory.BitVecVal(start, 256) ) parts = []