From 57fae13156b63d4929302d24b4ad730a904f659a Mon Sep 17 00:00:00 2001 From: Joran Honig Date: Tue, 1 May 2018 13:54:30 +0200 Subject: [PATCH] Don't do fp detection for mul statements --- .circleci/config.yml | 2 +- mythril/analysis/modules/integer.py | 7 ++++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index def4ffc7..08ea558e 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -12,7 +12,7 @@ jobs: # Uncomment, for local testing with circleci command, as it ignores # path param in checkout command, and this symlink compenstates for that. - # - run: ln -s /root/project /home/mythril + - run: ln -s /root/project /home/mythril - run: name: Installing mythril tools diff --git a/mythril/analysis/modules/integer.py b/mythril/analysis/modules/integer.py index 48434822..406751f3 100644 --- a/mythril/analysis/modules/integer.py +++ b/mythril/analysis/modules/integer.py @@ -82,7 +82,7 @@ def _check_integer_overflow(statespace, state, node): logging.debug("[INTEGER_OVERFLOW] no model found") return issues - if not _verify_integer_overflow(statespace, node, expr, state, model, constraint, op0, op1): + if instruction['opcode'] != "MUL" and not _verify_integer_overflow(statespace, node, expr, state, model, constraint, op0, op1) : return issues # Build issue @@ -277,12 +277,13 @@ def _search_children(statespace, node, expression, constraint=[], index=0, depth continue results += element - # Recursively search children + # Recursively search children children = \ [ statespace.nodes[edge.node_to] for edge in statespace.edges - if edge.node_from == node.uid and _try_constraints(statespace.nodes[edge.node_to].constraints, constraint) is not None + if edge.node_from == node.uid + and _try_constraints(statespace.nodes[edge.node_to].constraints, constraint) is not None ] for child in children: