Check for None as constraints

pull/1131/head
Nikhil 5 years ago
parent 2ad4665399
commit c900abad81
  1. 10
      mythril/analysis/modules/dependence_on_predictable_vars.py

@ -1,6 +1,7 @@
"""This module contains the detection code for predictable variable
dependence."""
import logging
from copy import copy
from mythril.analysis.modules.base import DetectionModule
from mythril.analysis.report import Issue
@ -99,9 +100,12 @@ class PredictableDependenceModule(DetectionModule):
for annotation in state.annotations:
if isinstance(annotation, PredictablePathAnnotation):
constraints = (
state.mstate.constraints + annotation.add_constraints
)
if annotation.add_constraints:
constraints = (
state.mstate.constraints + annotation.add_constraints
)
else:
constraints = copy(state.mstate.constraints)
try:
transaction_sequence = solver.get_transaction_sequence(
state, constraints

Loading…
Cancel
Save