Implement norhh suggestions

pull/1041/head
Bernhard Mueller 6 years ago
parent fca8dd01fb
commit 386855ae2f
  1. 7
      mythril/analysis/modules/dos.py

@ -56,12 +56,11 @@ class DOS(DetectionModule):
target = util.get_concrete_int(state.mstate.stack[-1])
try:
transaction = state.current_transaction
self._jumpdest_count[transaction]
if state.current_transaction in self._jumpdest_count:
try:
if self._jumpdest_count[transaction][target] > 3:
if self._jumpdest_count[transaction][target] == 4:
state.annotate(
LoopAnnotation(state.get_current_instruction()["address"])
)
@ -70,7 +69,7 @@ class DOS(DetectionModule):
except KeyError:
self._jumpdest_count[transaction][target] = 0
except KeyError:
else:
self._jumpdest_count[transaction] = {}
self._jumpdest_count[transaction][target] = 0

Loading…
Cancel
Save