summaryrefslogtreecommitdiff
path: root/proto.h
diff options
context:
space:
mode:
authorHugo van der Sanden <hv@crypt.org>2020-04-28 18:52:44 +0100
committerSteve Hay <steve.m.hay@googlemail.com>2020-06-01 20:35:51 +0100
commit3a1df45e827a79d14694d18dd0141c09a0abfe5c (patch)
treedd73e954d63fe07d1c7a785dac9d022d9ccaa45b /proto.h
parent0e9563b9242a5758c6ce11daf8385b3753e9ed9c (diff)
downloadperl-3a1df45e827a79d14694d18dd0141c09a0abfe5c.tar.gz
study_chunk: honour mutate_ok over recursion
As described in #17743, study_chunk can re-enter itself either by simple recursion or by enframing. 089ad25d3f used the new mutate_ok variable to track whether we were within the framing scope of GOSUB, and to disallow mutating changes to ops if so. This commit extends that logic to reentry by recursion, passing in the current state as was_mutate_ok. (CVE-2020-12723) (cherry picked from commit 3445383845ed220eaa12cd406db2067eb7b8a741)
Diffstat (limited to 'proto.h')
-rw-r--r--proto.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/proto.h b/proto.h
index 88ec328cdc..02ef4edb3b 100644
--- a/proto.h
+++ b/proto.h
@@ -5934,7 +5934,7 @@ STATIC void S_ssc_or(pTHX_ const RExC_state_t *pRExC_state, regnode_ssc *ssc, co
STATIC void S_ssc_union(pTHX_ regnode_ssc *ssc, SV* const invlist, const bool invert_2nd);
#define PERL_ARGS_ASSERT_SSC_UNION \
assert(ssc); assert(invlist)
-STATIC SSize_t S_study_chunk(pTHX_ RExC_state_t *pRExC_state, regnode **scanp, SSize_t *minlenp, SSize_t *deltap, regnode *last, struct scan_data_t *data, I32 stopparen, U32 recursed_depth, regnode_ssc *and_withp, U32 flags, U32 depth);
+STATIC SSize_t S_study_chunk(pTHX_ RExC_state_t *pRExC_state, regnode **scanp, SSize_t *minlenp, SSize_t *deltap, regnode *last, struct scan_data_t *data, I32 stopparen, U32 recursed_depth, regnode_ssc *and_withp, U32 flags, U32 depth, bool was_mutate_ok);
#define PERL_ARGS_ASSERT_STUDY_CHUNK \
assert(pRExC_state); assert(scanp); assert(minlenp); assert(deltap); assert(last)
#endif