summaryrefslogtreecommitdiff
path: root/pp_ctl.c
diff options
context:
space:
mode:
authorNiko Tyni <ntyni@debian.org>2010-11-13 00:02:07 +0200
committerFather Chrysostomos <sprout@cpan.org>2010-11-14 16:52:23 -0800
commit125b9982af05cc67a7f8daefd5060a9eb9524824 (patch)
treedf0d7e0e78095a25e83cae94af54a54302f342fc /pp_ctl.c
parent99e6ea262e0d5e6a5eea5692f2b99d422027c0a4 (diff)
downloadperl-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.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/pp_ctl.c b/pp_ctl.c
index 4c3ffafb7e..3e6e46c389 100644
--- a/pp_ctl.c
+++ b/pp_ctl.c
@@ -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: