Fixed an issue in external-functions detector that iterated on a contract instead of its function properties.

pull/117/head
David Pokora 6 years ago
parent af646da29e
commit bb057c1435
No known key found for this signature in database
GPG Key ID: 3CED48D1BB21BDD7
  1. 2
      slither/detectors/functions/external_function.py

@ -143,7 +143,7 @@ class ExternalFunction(AbstractDetector):
sources_with_dynamic_calls = set(all_possible_sources) & dynamic_call_contracts sources_with_dynamic_calls = set(all_possible_sources) & dynamic_call_contracts
if sources_with_dynamic_calls: if sources_with_dynamic_calls:
functions_in_dynamic_call_sources = set([f for dyn_contract in sources_with_dynamic_calls functions_in_dynamic_call_sources = set([f for dyn_contract in sources_with_dynamic_calls
for f in dyn_contract if not f.is_constructor]) for f in dyn_contract.functions if not f.is_constructor])
completed_functions = completed_functions.union(functions_in_dynamic_call_sources) completed_functions = completed_functions.union(functions_in_dynamic_call_sources)
continue continue

Loading…
Cancel
Save