LockedEther: Add NewContract to the list of msg.value checks (close #114)

pull/122/head
Josselin 6 years ago
parent 7f93370128
commit 6124a46044
  1. 4
      slither/detectors/attributes/locked_ether.py

@ -5,7 +5,7 @@
from slither.detectors.abstract_detector import (AbstractDetector,
DetectorClassification)
from slither.slithir.operations import (HighLevelCall, LowLevelCall, Send,
Transfer)
Transfer, NewContract)
class LockedEther(AbstractDetector):
@ -28,7 +28,7 @@ class LockedEther(AbstractDetector):
return False
for node in function.nodes:
for ir in node.irs:
if isinstance(ir, (Send, Transfer, HighLevelCall, LowLevelCall)):
if isinstance(ir, (Send, Transfer, HighLevelCall, LowLevelCall, NewContract)):
if ir.call_value and ir.call_value != 0:
return False
if isinstance(ir, (LowLevelCall)):

Loading…
Cancel
Save