diff options
author | Chip Salzenberg <chip@perl.com> | 1997-02-20 09:58:01 +1200 |
---|---|---|
committer | Chip Salzenberg <chip@atlantic.net> | 1997-02-22 04:41:00 +1200 |
commit | 9212bbba480c82a883da56c53e3d103dc36aa284 (patch) | |
tree | 181e463eb7a19b96ed43ba01ada2322994020f52 /pp_ctl.c | |
parent | 8bc0c6bd1de3e2ed6fe3c9fb3d47057f034b23aa (diff) | |
download | perl-9212bbba480c82a883da56c53e3d103dc36aa284.tar.gz |
Don't taint $x in C<$x = ($tainted =~ /(\w+)/)>
Diffstat (limited to 'pp_ctl.c')
-rw-r--r-- | pp_ctl.c | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -123,6 +123,8 @@ PP(pp_substcont) SV *targ = cx->sb_targ; sv_catpvn(dstr, s, cx->sb_strend - s); + TAINT_IF(cx->sb_rxtainted || rx->exec_tainted); + (void)SvOOK_off(targ); Safefree(SvPVX(targ)); SvPVX(targ) = SvPVX(dstr); @@ -133,8 +135,7 @@ PP(pp_substcont) (void)SvPOK_only(targ); SvSETMAGIC(targ); - if (cx->sb_rxtainted) - SvTAINTED_on(targ); + SvTAINT(targ); PUSHs(sv_2mortal(newSViv((I32)cx->sb_iters - 1))); LEAVE_SCOPE(cx->sb_oldsave); POPSUBST(cx); |