]> granicus.if.org Git - onig/commitdiff
fix calling condition for subexp_inf_recursive_check()
authorK.Kosako <kosako@sofnec.co.jp>
Wed, 14 Jun 2017 06:24:29 +0000 (15:24 +0900)
committerK.Kosako <kosako@sofnec.co.jp>
Wed, 14 Jun 2017 06:24:29 +0000 (15:24 +0900)
src/regcomp.c

index db47a306bcff98cd43af5de03961d5fc20bfa087..0f884a198bec841bf9d4b8954303950d10094f05 100644 (file)
@@ -2867,7 +2867,7 @@ subexp_inf_recursive_check_trav(Node* node, ScanEnv* env)
     break;
 
   case NODE_ENCLOSURE:
-    if (NODE_IS_RECURSION(node)) {
+    if (NODE_IS_RECURSION(node) && NODE_IS_CALLED(node)) {
       int ret;
 
       NODE_STATUS_ADD(node, NST_MARK1);