testlib/OpenSSL/Test.pm: keep default input private.
authorAndy Polyakov <appro@openssl.org>
Wed, 12 Apr 2017 20:51:30 +0000 (22:51 +0200)
committerAndy Polyakov <appro@openssl.org>
Fri, 14 Apr 2017 08:01:24 +0000 (10:01 +0200)
If $_ is not private, it can wipe caller's one, which proved to be
problematic...

Reviewed-by: Rich Salz <rsalz@openssl.org>
Reviewed-by: Richard Levitte <levitte@openssl.org>
test/testlib/OpenSSL/Test.pm

index c76ca1c..c4799e8 100644 (file)
@@ -460,6 +460,7 @@ sub run {
     # to make it easier to compare with a manual run of the command.
     if ($opts{capture} || defined($opts{prefix})) {
        my $pipe;
+       local $_;
 
        open($pipe, '-|', "$prefix$cmd") or die "Can't start command: $!";
        while(<$pipe>) {