Whitelist permitted types when adding constraint in integer_underflow.py

pull/72/head
Bernhard Mueller 7 years ago
parent 3077017a90
commit 61e74fb774
  1. 3
      mythril/analysis/modules/integer_underflow.py

@ -52,6 +52,9 @@ def execute(statespace):
logging.debug("[INTEGER_UNDERFLOW] Checking SUB " + str(op0) + ", " + str(op1) + " at address " + str(instruction['address'])) logging.debug("[INTEGER_UNDERFLOW] Checking SUB " + str(op0) + ", " + str(op1) + " at address " + str(instruction['address']))
allowed_types = [int, BitVecRef, BitVecNumRef]
if type(op0) in allowed_types and type(op1) in allowed_types:
constraints.append(UGT(op1,op0)) constraints.append(UGT(op1,op0))
try: try:

Loading…
Cancel
Save