diff options
author | Nicholas Clark <nick@ccl4.org> | 2006-02-18 18:23:43 +0000 |
---|---|---|
committer | Nicholas Clark <nick@ccl4.org> | 2006-02-18 18:23:43 +0000 |
commit | d020f5c489f4f9dfad0aa88c9bea73bdb19071d1 (patch) | |
tree | 8dc8c112b95da2adaff06eb144b0e7f47c16f0f7 /t/op/utftaint.t | |
parent | a70a16279b57a1b432b27e8b15d0377583bdb21f (diff) | |
download | perl-d020f5c489f4f9dfad0aa88c9bea73bdb19071d1.tar.gz |
Turn of tainting locally inside swash_init(), as the internal
implementation of the regexp engine has nothing to do with user data,
so when and where it happens to call require is agnostic of the current
expression's taintedness.
p4raw-id: //depot/perl@27221
Diffstat (limited to 't/op/utftaint.t')
-rw-r--r-- | t/op/utftaint.t | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/t/op/utftaint.t b/t/op/utftaint.t index 59dd96f09b..1294526d2b 100644 --- a/t/op/utftaint.t +++ b/t/op/utftaint.t @@ -18,7 +18,7 @@ sub tainted ($) { } require './test.pl'; -plan(tests => 3*10 + 3*8 + 2*16); +plan(tests => 3*10 + 3*8 + 2*16 + 2); my $arg = $ENV{PATH}; # a tainted value use constant UTF8 => "\x{1234}"; @@ -143,4 +143,10 @@ for my $ary ([ascii => 'perl'], [latin1 => "\xB6"]) { is(tainted($taint), tainted($arg), "tainted: $encode, downgrade down"); } +fresh_perl_is('$a = substr $^X, 0, 0; /\x{100}/i; /$a\x{100}/i || print q,ok,', + 'ok', {switches => ["-T", "-l"]}, + "matching a regexp is taint agnostic"); +fresh_perl_is('$a = substr $^X, 0, 0; /$a\x{100}/i || print q,ok,', + 'ok', {switches => ["-T", "-l"]}, + "therefore swash_init should be taint agnostic"); |