diff options
author | Niko Tyni <ntyni@debian.org> | 2010-11-13 00:02:07 +0200 |
---|---|---|
committer | Father Chrysostomos <sprout@cpan.org> | 2010-11-14 16:52:23 -0800 |
commit | 125b9982af05cc67a7f8daefd5060a9eb9524824 (patch) | |
tree | df0d7e0e78095a25e83cae94af54a54302f342fc /pp_ctl.c | |
parent | 99e6ea262e0d5e6a5eea5692f2b99d422027c0a4 (diff) | |
download | perl-125b9982af05cc67a7f8daefd5060a9eb9524824.tar.gz |
Implement $^A tainting
The format accumulator $^A now becomes tainted when formline() is
called with tainted data.
There is still one failing test from the TODO set; it seems
that the $^A get magic is handled too late for the taintedness
to show up.
Diffstat (limited to 'pp_ctl.c')
-rw-r--r-- | pp_ctl.c | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -524,6 +524,8 @@ PP(pp_formline) return parseres; } SvPV_force(PL_formtarget, len); + if (SvTAINTED(tmpForm)) + SvTAINTED_on(PL_formtarget); if (DO_UTF8(PL_formtarget)) targ_is_utf8 = TRUE; t = SvGROW(PL_formtarget, len + fudge + 1); /* XXX SvCUR bad */ @@ -605,6 +607,8 @@ PP(pp_formline) sv = &PL_sv_no; Perl_ck_warner(aTHX_ packWARN(WARN_SYNTAX), "Not enough format arguments"); } + if (SvTAINTED(sv)) + SvTAINTED_on(PL_formtarget); break; case FF_CHECKNL: |