In perl.git, the branch smoke-me/hugmeir/dump_c_cleanliness has been updated

<http://perl5.git.perl.org/perl.git/commitdiff/576faa1ee8f498a05752cdf22083aa9560605077?hp=25ee3e5d691964f0c4a2beff32f2b1c4b506a1e2>

- Log -----------------------------------------------------------------
commit 576faa1ee8f498a05752cdf22083aa9560605077
Author: Brian Fraser <[email protected]>
Date:   Sat Sep 28 10:34:34 2013 -0300

    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.
-----------------------------------------------------------------------

Summary of changes:
 ext/Devel-Peek/t/Peek.t | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/ext/Devel-Peek/t/Peek.t b/ext/Devel-Peek/t/Peek.t
index 40555ad..adffdba 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',

--
Perl5 Master Repository

Reply via email to