diff options
author | David Mitchell <davem@iabyn.com> | 2011-02-16 17:17:18 +0000 |
---|---|---|
committer | David Mitchell <davem@iabyn.com> | 2011-02-16 17:34:08 +0000 |
commit | ef07e810699a20ac03620e091b78c1c6ef971c32 (patch) | |
tree | a8a2b4336cee567c62d4edd14b95b9532df16cd9 /pp_ctl.c | |
parent | 20be6587f85cec282e10810718c869dd958afe43 (diff) | |
download | perl-ef07e810699a20ac03620e091b78c1c6ef971c32.tar.gz |
document how tainting works with pattern matching
Diffstat (limited to 'pp_ctl.c')
-rw-r--r-- | pp_ctl.c | 7 |
1 files changed, 5 insertions, 2 deletions
@@ -294,6 +294,7 @@ PP(pp_substcont) SvGETMAGIC(TOPs); /* possibly clear taint on $1 etc: #67962 */ + /* See "how taint works" above pp_subst() */ if (SvTAINTED(TOPs)) cx->sb_rxtainted |= SUBST_TAINT_REPL; sv_catsv_nomg(dstr, POPs); @@ -343,7 +344,8 @@ PP(pp_substcont) (void)SvPOK_only_UTF8(targ); /* update the taint state of various various variables in - * preparation for final exit */ + * preparation for final exit. + * See "how taint works" above pp_subst() */ if (PL_tainting) { if ((cx->sb_rxtainted & SUBST_TAINT_PAT) || ((cx->sb_rxtainted & (SUBST_TAINT_STR|SUBST_TAINT_RETAINT)) @@ -402,7 +404,8 @@ PP(pp_substcont) if (old != rx) (void)ReREFCNT_inc(rx); /* update the taint state of various various variables in preparation - * for calling the code block */ + * for calling the code block. + * See "how taint works" above pp_subst() */ if (PL_tainting) { if (RX_MATCH_TAINTED(rx)) /* run time pattern taint, eg locale */ cx->sb_rxtainted |= SUBST_TAINT_PAT; |