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 c76ca1caa67b4cf5d06105887ee12714828516ef..c4799e864892ed2836f03ac57adf150dd91dec72 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>) {