Merge pull request #1131 from ConsenSys/add_tx_data

Check for None as constraints
pull/1134/head
Bernhard Mueller 5 years ago committed by GitHub
commit 4458ec07c3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  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