提交 e3ff0892 编写于 作者: R Richard Levitte

Small fix in OpenSSL::Test

Be careful when shifting in a function argument, you end up changing
the caller's value.  Instead, when it is an array, make a shallow copy
and shift in that instead.
Reviewed-by: NRich Salz <rsalz@openssl.org>
上级 5beb63c4
......@@ -695,8 +695,10 @@ sub __build_cmd {
my $num = shift;
my $path_builder = shift;
my $cmd = __fixup_cmd($path_builder->(shift @{$_[0]}));
my @args = @{$_[0]}; shift;
# Make a copy to not destroy the caller's array
my @cmdarray = ( @{$_[0]} ); shift;
my $cmd = __fixup_cmd($path_builder->(shift @cmdarray));
my @args = @cmdarray;
my %opts = @_;
return () if !$cmd;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册