summaryrefslogtreecommitdiff
path: root/pp_hot.c
diff options
context:
space:
mode:
authorDavid Mitchell <davem@iabyn.com>2011-02-17 14:50:04 +0000
committerDavid Mitchell <davem@iabyn.com>2011-02-18 11:25:24 +0000
commit9274aefd575ecb452e8b3e33659780c198ca43ab (patch)
treedadc562b6515d875e50a8fc8e94411c1f290bb5f /pp_hot.c
parent5e79dfb9cd4496df40e823bec270c4bcde98db07 (diff)
downloadperl-9274aefd575ecb452e8b3e33659780c198ca43ab.tar.gz
taint REGEX SVs as well as refs to them
Now that REGEX is actually a first-class SV type, we can taint the regex SV directly, as well as the RV pointing to it. This means that this now taints: $rr = qr/$tainted/; $r = $$r; /$r/;
Diffstat (limited to 'pp_hot.c')
-rw-r--r--pp_hot.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/pp_hot.c b/pp_hot.c
index 4fb5f01aab..e452f07b54 100644
--- a/pp_hot.c
+++ b/pp_hot.c
@@ -1235,8 +1235,10 @@ PP(pp_qr)
(void)sv_bless(rv, stash);
}
- if (RX_EXTFLAGS(rx) & RXf_TAINTED)
+ if (RX_EXTFLAGS(rx) & RXf_TAINTED) {
SvTAINTED_on(rv);
+ SvTAINTED_on(SvRV(rv));
+ }
XPUSHs(rv);
RETURN;
}