diff options
author | Hugo van der Sanden <hv@crypt.org> | 2020-01-26 18:28:43 +0000 |
---|---|---|
committer | Hugo van der Sanden <hv@crypt.org> | 2020-01-27 03:37:08 +0000 |
commit | af6880c950bceae5aa17dc228f139d0b4e797594 (patch) | |
tree | 79e112a986abc0d7ace522ffb31776beed3e2b4c /regexec.c | |
parent | 98c72b16911cb7c3ea03265b01e3d6e2e89a3291 (diff) | |
download | perl-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.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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 { |