From 41ce26631850f6fecf1558d62e1b875f0b17d813 Mon Sep 17 00:00:00 2001 From: Bernhard Mueller Date: Fri, 7 Jun 2019 16:07:46 +0200 Subject: [PATCH] Decouple analysis module & re-set limit to 4 --- mythril/analysis/modules/dos.py | 3 +-- mythril/laser/ethereum/strategy/custom.py | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/mythril/analysis/modules/dos.py b/mythril/analysis/modules/dos.py index 47e8db00..3427cd15 100644 --- a/mythril/analysis/modules/dos.py +++ b/mythril/analysis/modules/dos.py @@ -4,7 +4,6 @@ import logging from typing import Dict, cast, List from mythril.analysis.swc_data import DOS_WITH_BLOCK_GAS_LIMIT -from mythril.laser.ethereum.strategy.custom import JUMPDEST_LIMIT from mythril.analysis.report import Issue from mythril.analysis.modules.base import DetectionModule from mythril.laser.ethereum.state.global_state import GlobalState @@ -71,7 +70,7 @@ class DOS(DetectionModule): try: self._jumpdest_count[transaction][target] += 1 - if self._jumpdest_count[transaction][target] == JUMPDEST_LIMIT - 1: + if self._jumpdest_count[transaction][target] == 3: annotation = ( LoopAnnotation(address, target) diff --git a/mythril/laser/ethereum/strategy/custom.py b/mythril/laser/ethereum/strategy/custom.py index 71c20613..9e89a552 100644 --- a/mythril/laser/ethereum/strategy/custom.py +++ b/mythril/laser/ethereum/strategy/custom.py @@ -7,7 +7,7 @@ from copy import copy import logging -JUMPDEST_LIMIT = 2 +JUMPDEST_LIMIT = 4 log = logging.getLogger(__name__)