diff --git a/slither/detectors/reentrancy/reentrancy_benign.py b/slither/detectors/reentrancy/reentrancy_benign.py index 26570f02c..f8834d1f0 100644 --- a/slither/detectors/reentrancy/reentrancy_benign.py +++ b/slither/detectors/reentrancy/reentrancy_benign.py @@ -30,6 +30,8 @@ class ReentrancyBenign(Reentrancy): for f in contract.functions_and_modifiers_not_inherited: for node in f.nodes: if node.context[self.KEY]['calls']: + if not any(n!=node for n in node.context[self.KEY]['calls']): + continue read_then_written = [] for c in node.context[self.KEY]['calls']: read_then_written += [v for v in node.context[self.KEY]['written'] diff --git a/slither/detectors/reentrancy/reentrancy_eth.py b/slither/detectors/reentrancy/reentrancy_eth.py index f77b80c46..4e2e648bc 100644 --- a/slither/detectors/reentrancy/reentrancy_eth.py +++ b/slither/detectors/reentrancy/reentrancy_eth.py @@ -31,6 +31,8 @@ class ReentrancyEth(Reentrancy): for f in contract.functions_and_modifiers_not_inherited: for node in f.nodes: if node.context[self.KEY]['calls'] and node.context[self.KEY]['send_eth']: + if not any(n!=node for n in node.context[self.KEY]['send_eth']): + continue read_then_written = [] for c in node.context[self.KEY]['calls']: if c == node: