This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
5.004_56: Patch to Tie::Hash and docs
[perl5.git] / regcomp.c
index bb1b86a..aa713bc 100644 (file)
--- a/regcomp.c
+++ b/regcomp.c
@@ -1065,11 +1065,12 @@ reg(I32 paren, I32 *flagp)
                    rx->data->data[n+1] = (void*)av;
                    rx->data->data[n+2] = (void*)sop;
                    SvREFCNT_dec(sv);
+               } else {                /* First pass */
+                   if (tainted)
+                       FAIL("Eval-group in insecure regular expression");
                }
                
                nextchar();
-               if (tainted)
-                   FAIL("Eval-group in insecure regular expression");
                return reganode(EVAL, n);
            }
            case '(':