diff options
author | Brian Fraser <fraserbn@gmail.com> | 2013-09-28 10:34:34 -0300 |
---|---|---|
committer | Brian Fraser <fraserbn@gmail.com> | 2014-01-04 15:37:48 -0300 |
commit | bea5cecf09ba646ff0ff797c17f2360066b71732 (patch) | |
tree | 66a38a92c81346f6ca9621dfd086aea4f6c9c9a2 /ext/Devel-Peek | |
parent | 559d64fb313a6fefb155ad878b0887c48a1570e7 (diff) | |
download | perl-bea5cecf09ba646ff0ff797c17f2360066b71732.tar.gz |
ext/Devel-Peek/t/Peek.t: Don't leave PATH tainted.
The tests originally left $ENV{PATH} tainted. However, now that
the file ends up using fresh_perl_is(), $ENV{PATH} may end up
being used in some systems, like in Windows.
Diffstat (limited to 'ext/Devel-Peek')
-rw-r--r-- | ext/Devel-Peek/t/Peek.t | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/ext/Devel-Peek/t/Peek.t b/ext/Devel-Peek/t/Peek.t index 18c40d7161..4a7af4274f 100644 --- a/ext/Devel-Peek/t/Peek.t +++ b/ext/Devel-Peek/t/Peek.t @@ -626,6 +626,8 @@ do_test('scalar with pos magic', # ENV hashes is also not always null terminated. # if (${^TAINT}) { + # Save and restore PATH, since fresh_perl ends up using that in Windows. + my $path = $ENV{PATH}; do_test('tainted value in %ENV', $ENV{PATH}=@ARGV, # scalar(@ARGV) is a handy known tainted value 'SV = PVMG\\($ADDR\\) at $ADDR @@ -653,6 +655,7 @@ if (${^TAINT}) { MAGIC = $ADDR MG_VIRTUAL = &PL_vtbl_taint MG_TYPE = PERL_MAGIC_taint\\(t\\)'); + $ENV{PATH} = $path; } do_test('blessed reference', |