diff options
author | Radu Greab <radu@netsoft.ro> | 2000-10-03 01:03:44 +0300 |
---|---|---|
committer | Jarkko Hietaniemi <jhi@iki.fi> | 2000-10-02 23:35:40 +0000 |
commit | 35fba0d9b63c24c469494ae4d5dc6f37fed89345 (patch) | |
tree | 4a3a2033c50e7c9a1eeb6732682fe21898afa3d6 /op.c | |
parent | 01bb7c6d67bc951562ed98068eba189cadd42374 (diff) | |
download | perl-35fba0d9b63c24c469494ae4d5dc6f37fed89345.tar.gz |
Re: [ID 20000912.008] substr replacement of tainted data (bug)
Message-ID: <14808.56336.594486.626712@busy.netsoft.ro>
p4raw-id: //depot/perl@7111
Diffstat (limited to 'op.c')
-rw-r--r-- | op.c | 16 |
1 files changed, 16 insertions, 0 deletions
@@ -6463,6 +6463,22 @@ Perl_ck_trunc(pTHX_ OP *o) return ck_fun(o); } +OP * +Perl_ck_substr(pTHX_ OP *o) +{ + o = ck_fun(o); + if ((o->op_flags & OPf_KIDS) && o->op_private == 4) { + OP *kid = cLISTOPo->op_first; + + if (kid->op_type == OP_NULL) + kid = kid->op_sibling; + if (kid) + kid->op_flags |= OPf_MOD; + + } + return o; +} + /* A peephole optimizer. We visit the ops in the order they're to execute. */ void |