summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndy Polyakov <appro@openssl.org>2017-04-12 22:51:30 +0200
committerAndy Polyakov <appro@openssl.org>2017-04-14 10:01:24 +0200
commit93f725a3fcf00701cc8d5c2943383b9aa233aeb4 (patch)
tree9970ef79cac7d0378289163e4f4ed1dfca738333
parentd063add7cbdaf82e6208ef01414432320260e974 (diff)
testlib/OpenSSL/Test.pm: keep default input private.
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>
-rw-r--r--test/testlib/OpenSSL/Test.pm1
1 files changed, 1 insertions, 0 deletions
diff --git a/test/testlib/OpenSSL/Test.pm b/test/testlib/OpenSSL/Test.pm
index c76ca1caa6..c4799e8648 100644
--- a/test/testlib/OpenSSL/Test.pm
+++ b/test/testlib/OpenSSL/Test.pm
@@ -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>) {