diff options
author | Gurusamy Sarathy <gsar@cpan.org> | 1998-07-04 01:51:47 +0000 |
---|---|---|
committer | Gurusamy Sarathy <gsar@cpan.org> | 1998-07-04 01:51:47 +0000 |
commit | b3eb6a9ba72c92b7decf330d8d63b32ba5499629 (patch) | |
tree | b3af31372ba9c68faf41895b58e0baa1f9372d16 /pp_hot.c | |
parent | 85b81015bdcfa6e7a9ccddddb0d3face7465f666 (diff) | |
download | perl-b3eb6a9ba72c92b7decf330d8d63b32ba5499629.tar.gz |
merge changes#1210,1211,1270 from maintbranch
p4raw-link: @1270 on //depot/maint-5.004/perl: 413603941653f55130af336b8e990052b26673a6
p4raw-link: @1211 on //depot/maint-5.004/perl: 247620c138019426962998dd7edc0157874220f0
p4raw-link: @1210 on //depot/maint-5.004/perl: 4522f71f5c16bf8892b1952004accec53aab868e
p4raw-id: //depot/perl@1277
Diffstat (limited to 'pp_hot.c')
-rw-r--r-- | pp_hot.c | 12 |
1 files changed, 9 insertions, 3 deletions
@@ -786,6 +786,7 @@ PP(pp_match) I32 safebase; char *truebase; register REGEXP *rx = pm->op_pmregexp; + bool rxtainted; I32 gimme = GIMME; STRLEN len; I32 minmatch = 0; @@ -804,6 +805,8 @@ PP(pp_match) strend = s + len; if (!s) DIE("panic: do_match"); + rxtainted = ((pm->op_pmdynflags & PMdf_TAINTED) || + (tainted && (pm->op_pmflags & PMf_RETAINT))); TAINT_NOT; if (pm->op_pmdynflags & PMdf_USED) { @@ -910,7 +913,7 @@ play_it_again: /*NOTREACHED*/ gotcha: - TAINT_IF(RX_MATCH_TAINTED(rx)); + RX_MATCH_TAINTED_SET(rx, rxtainted); if (gimme == G_ARRAY) { I32 iters, i, len; @@ -963,7 +966,7 @@ play_it_again: } yup: /* Confirmed by check_substr */ - TAINT_IF(RX_MATCH_TAINTED(rx)); + RX_MATCH_TAINTED_SET(rx, rxtainted); ++BmUSEFUL(rx->check_substr); curpm = pm; if (pm->op_pmflags & PMf_ONCE) @@ -1520,7 +1523,10 @@ PP(pp_subst) s = SvPV(TARG, len); if (!SvPOKp(TARG) || SvTYPE(TARG) == SVt_PVGV) force_on_match = 1; - rxtainted = tainted << 1; + rxtainted = ((pm->op_pmdynflags & PMdf_TAINTED) || + (tainted && (pm->op_pmflags & PMf_RETAINT))); + if (tainted) + rxtainted |= 2; TAINT_NOT; force_it: |