From: Andy Polyakov Date: Wed, 12 Apr 2017 20:51:30 +0000 (+0200) Subject: testlib/OpenSSL/Test.pm: keep default input private. X-Git-Tag: OpenSSL_1_1_1-pre1~1764 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=93f725a3fcf00701cc8d5c2943383b9aa233aeb4;p=oweals%2Fopenssl.git 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 Reviewed-by: Richard Levitte --- 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>) {