summaryrefslogtreecommitdiff
path: root/pp_ctl.c
diff options
context:
space:
mode:
authorDavid Mitchell <davem@iabyn.com>2011-02-16 17:17:18 +0000
committerDavid Mitchell <davem@iabyn.com>2011-02-16 17:34:08 +0000
commitef07e810699a20ac03620e091b78c1c6ef971c32 (patch)
treea8a2b4336cee567c62d4edd14b95b9532df16cd9 /pp_ctl.c
parent20be6587f85cec282e10810718c869dd958afe43 (diff)
downloadperl-ef07e810699a20ac03620e091b78c1c6ef971c32.tar.gz
document how tainting works with pattern matching
Diffstat (limited to 'pp_ctl.c')
-rw-r--r--pp_ctl.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/pp_ctl.c b/pp_ctl.c
index ea7a2cd0ec..7ff109fef1 100644
--- a/pp_ctl.c
+++ b/pp_ctl.c
@@ -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;