Configuration: make sure the shared_sources table doesn't contain empty elements
authorRichard Levitte <levitte@openssl.org>
Tue, 13 Nov 2018 17:49:21 +0000 (18:49 +0100)
committerRichard Levitte <levitte@openssl.org>
Tue, 13 Nov 2018 22:53:54 +0000 (23:53 +0100)
Fixes #7634

Reviewed-by: Viktor Dukhovni <viktor@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/7635)

(cherry picked from commit 0c594ccc29f6ba241627f436ba3d05fc400d1066)

Configure

index d85ff6aa4da91573b25406ae0877b508e3766757..a1ce65239e2bc343c32a24f4c011d3575a41c20d 100755 (executable)
--- a/Configure
+++ b/Configure
@@ -1906,8 +1906,8 @@ EOF
             next unless defined($unified_info{includes}->{$dest}->{$k});
             my @incs = reverse @{$unified_info{includes}->{$dest}->{$k}};
             foreach my $obj (grep /\.o$/,
-                             (keys %{$unified_info{sources}->{$dest}},
-                              keys %{$unified_info{shared_sources}->{$dest}})) {
+                             (keys %{$unified_info{sources}->{$dest} // {}},
+                              keys %{$unified_info{shared_sources}->{$dest} // {}})) {
                 foreach my $inc (@incs) {
                     unshift @{$unified_info{includes}->{$obj}->{$k}}, $inc
                         unless grep { $_ eq $inc } @{$unified_info{includes}->{$obj}->{$k}};