From 7f069476013153192abc53bd5b47bdfa2840b3e8 Mon Sep 17 00:00:00 2001 From: Josselin Date: Wed, 15 Jul 2020 18:18:31 +0200 Subject: [PATCH] Prevent infite loop on nested try/catch/if/then/else (fix #533) --- slither/solc_parsing/declarations/function.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/slither/solc_parsing/declarations/function.py b/slither/solc_parsing/declarations/function.py index fafa4527a..1bffc1fd7 100644 --- a/slither/solc_parsing/declarations/function.py +++ b/slither/solc_parsing/declarations/function.py @@ -995,7 +995,8 @@ class FunctionSolc: link_nodes(node, end_node) else: for son in node.sons: - self._fix_catch(son, end_node) + if son != end_node: + self._fix_catch(son, end_node) def _add_param(self, param: Dict) -> LocalVariableSolc: