summaryrefslogtreecommitdiff
path: root/regcomp.c
diff options
context:
space:
mode:
authorDavid Mitchell <davem@iabyn.com>2012-04-01 13:22:14 +0100
committerDavid Mitchell <davem@iabyn.com>2012-06-13 13:32:51 +0100
commit5f616ea71479dec56520bc87978dd87ad7478dae (patch)
tree15033cd9e6557b053fe9c33cc44e40e82a0b29a6 /regcomp.c
parentf59909ab8dad6ceb1b77e37e3c84e0c43fa33064 (diff)
downloadperl-5f616ea71479dec56520bc87978dd87ad7478dae.tar.gz
eliminate RExC_seen_evals and RExC_rx->seen_evals
these were used as part of the old "use re 'eval'" security mechanism used by the now-eliminated PL_reginterp_cnt
Diffstat (limited to 'regcomp.c')
-rw-r--r--regcomp.c9
1 files changed, 1 insertions, 8 deletions
diff --git a/regcomp.c b/regcomp.c
index fc13f9dc9e..42fedf4d75 100644
--- a/regcomp.c
+++ b/regcomp.c
@@ -133,7 +133,6 @@ typedef struct RExC_state_t {
I32 nestroot; /* root parens we are in - used by accept */
I32 extralen;
I32 seen_zerolen;
- I32 seen_evals;
regnode **open_parens; /* pointers to open parens */
regnode **close_parens; /* pointers to close parens */
regnode *opend; /* END node in program */
@@ -194,7 +193,6 @@ typedef struct RExC_state_t {
#define RExC_nestroot (pRExC_state->nestroot)
#define RExC_extralen (pRExC_state->extralen)
#define RExC_seen_zerolen (pRExC_state->seen_zerolen)
-#define RExC_seen_evals (pRExC_state->seen_evals)
#define RExC_utf8 (pRExC_state->utf8)
#define RExC_uni_semantics (pRExC_state->uni_semantics)
#define RExC_orig_utf8 (pRExC_state->orig_utf8)
@@ -5715,7 +5713,6 @@ Perl_re_op_compile(pTHX_ SV ** const patternp, int pat_count,
RExC_seen = 0;
RExC_in_lookbehind = 0;
RExC_seen_zerolen = *exp == '^' ? -1 : 0;
- RExC_seen_evals = 0;
RExC_extralen = 0;
RExC_override_recoding = 0;
@@ -5916,8 +5913,6 @@ Perl_re_op_compile(pTHX_ SV ** const patternp, int pat_count,
RExC_emit_bound = ri->program + RExC_size + 1;
pRExC_state->code_index = 0;
- /* Store the count of eval-groups for security checks: */
- RExC_rx->seen_evals = RExC_seen_evals;
REGC((U8)REG_MAGIC, (char*) RExC_emit++);
if (reg(pRExC_state, 0, &flags,1) == NULL) {
ReREFCNT_dec(rx);
@@ -8592,9 +8587,7 @@ S_reg(pTHX_ RExC_state_t *pRExC_state, I32 paren, I32 *flagp,U32 depth)
/* this is a pre-compiled code block (?{...}) */
cb = &pRExC_state->code_blocks[pRExC_state->code_index];
RExC_parse = RExC_start + cb->end;
- if (SIZE_ONLY)
- RExC_seen_evals++;
- else {
+ if (!SIZE_ONLY) {
OP *o = cb->block;
if (cb->src_regex) {
n = add_data(pRExC_state, 2, "rl");