/* XXXX Should store the old value to allow for tie/overload - and
restore in regcomp, where marked with XXXX. */
PL_reginterp_cnt = 0;
+ TAINT_NOT;
return NORMAL;
}
char *orig = cx->sb_orig;
register REGEXP *rx = cx->sb_rx;
SV *nsv = Nullsv;
-
- {
- REGEXP *old = PM_GETRE(pm);
- if(old != rx) {
+ REGEXP *old = PM_GETRE(pm);
+ if(old != rx) {
if(old)
- ReREFCNT_dec(old);
+ ReREFCNT_dec(old);
PM_SETRE(pm,rx);
- }
}
rxres_restore(&cx->sb_rxres, rx);
sv_pos_b2u(sv, &i);
mg->mg_len = i;
}
- ReREFCNT_inc(rx);
+ if (old != rx)
+ ReREFCNT_inc(rx);
cx->sb_rxtainted |= RX_MATCH_TAINTED(rx);
rxres_save(&cx->sb_rxres, rx);
RETURNOP(pm->op_pmreplstart);
PERL_SCRIPT_MODE);
}
}
+ SP--;
}
PUTBACK;