summaryrefslogtreecommitdiff
path: root/regexec.c
diff options
context:
space:
mode:
authorHugo van der Sanden <hv@crypt.org>2020-01-26 18:28:43 +0000
committerHugo van der Sanden <hv@crypt.org>2020-01-27 03:37:08 +0000
commitaf6880c950bceae5aa17dc228f139d0b4e797594 (patch)
tree79e112a986abc0d7ace522ffb31776beed3e2b4c /regexec.c
parent98c72b16911cb7c3ea03265b01e3d6e2e89a3291 (diff)
downloadperl-af6880c950bceae5aa17dc228f139d0b4e797594.tar.gz
regexec: don't increment recursion counter for non-postponed EVAL
It wasn't intended to be part of the recursion logic, and doesn't get decremented again (GH 17490).
Diffstat (limited to 'regexec.c')
-rw-r--r--regexec.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/regexec.c b/regexec.c
index b6b83d8d4e..2ff6bb34d4 100644
--- a/regexec.c
+++ b/regexec.c
@@ -7409,7 +7409,7 @@ S_regmatch(pTHX_ regmatch_info *reginfo, char *startpos, regnode *prog)
/* NOTREACHED */
case EVAL: /* /(?{...})B/ /(??{A})B/ and /(?(?{...})X|Y)B/ */
- if (cur_eval && cur_eval->locinput==locinput) {
+ if (logical == 2 && cur_eval && cur_eval->locinput==locinput) {
if ( ++nochange_depth > max_nochange_depth )
Perl_croak(aTHX_ "EVAL without pos change exceeded limit in regex");
} else {