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

pull/122/head
Josselin 6 years ago
parent 8fbcf2bd66
commit 214229d9d6
  1. 4
      slither/detectors/attributes/locked_ether.py

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

Loading…
Cancel
Save