diff options
author | Yves Orton <demerphq@gmail.com> | 2023-03-18 10:57:34 +0100 |
---|---|---|
committer | Yves Orton <demerphq@gmail.com> | 2023-03-19 05:27:01 +0800 |
commit | 1ed8aa9fdf7c8713cc895a86e3f9f22f89dfd200 (patch) | |
tree | 8d30a7fb3af0a0a75b19c1fc23855908057b612a /pp_ctl.c | |
parent | 7e782439cfcb8fc251201ee657e2e330ba944500 (diff) | |
download | perl-1ed8aa9fdf7c8713cc895a86e3f9f22f89dfd200.tar.gz |
pp_ctl.c - don't overallocate paren buffers in rxres_save().
This was added as part of a different fix and was not properly
reverted when that fix was put on hold. This should only be
applied if we do adopt the patch which adds "start_new" and
"end_new" to the regexp_paren_pair structure.
Diffstat (limited to 'pp_ctl.c')
-rw-r--r-- | pp_ctl.c | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -379,11 +379,12 @@ Perl_rxres_save(pTHX_ void **rsp, REGEXP *rx) PERL_ARGS_ASSERT_RXRES_SAVE; PERL_UNUSED_CONTEXT; + /* deal with regexp_paren_pair items */ if (!p || p[1] < RX_NPARENS(rx)) { #ifdef PERL_ANY_COW - i = 7 + (RX_NPARENS(rx)+1) * 4; + i = 7 + (RX_NPARENS(rx)+1) * 2; #else - i = 6 + (RX_NPARENS(rx)+1) * 4; + i = 6 + (RX_NPARENS(rx)+1) * 2; #endif if (!p) Newx(p, i, UV); |