diff options
author | Karl Williamson <khw@cpan.org> | 2022-05-28 11:27:51 -0600 |
---|---|---|
committer | Karl Williamson <khw@cpan.org> | 2022-05-28 11:34:59 -0600 |
commit | bdadb244dbc743bdb32c9b5f33d0940d55b93f8d (patch) | |
tree | b1c9ea9f6db455b69da59e3cd5be41407daf84ee /regexec.c | |
parent | e1fa7ce9e264f21f1bbb000feaf336040252cd64 (diff) | |
download | perl-bdadb244dbc743bdb32c9b5f33d0940d55b93f8d.tar.gz |
regexec.c: Restore overzealous removal for GH#8369
I fixed this locally as a result of Hugo van der Sanden's comment in
#19636, but neglected to commit it.
Diffstat (limited to 'regexec.c')
-rw-r--r-- | regexec.c | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -8794,6 +8794,12 @@ NULL case WHILEM_B_min_fail: /* just failed to match B in a minimal match */ cur_curlyx = ST.save_curlyx; + if (cur_curlyx->u.curlyx.count >= /*max*/ARG2(cur_curlyx->u.curlyx.me)) { + /* Maximum greed exceeded */ + cur_curlyx->u.curlyx.count--; + CACHEsayNO; + } + DEBUG_EXECUTE_r(Perl_re_exec_indentf( aTHX_ "WHILEM: B min fail: trying longer...\n", depth) ); /* Try grabbing another A and see if it helps. */ |