Configure: ensure empty arrays aren't created inadvertently
authorRichard Levitte <levitte@openssl.org>
Thu, 1 Nov 2018 12:55:32 +0000 (13:55 +0100)
committerRichard Levitte <levitte@openssl.org>
Thu, 1 Nov 2018 14:41:47 +0000 (15:41 +0100)
Just refering to a hash table element as an array reference will
automatically create that element.  Avoid that by defaulting to
a separate empty array reference.

Fixes #7543

Reviewed-by: Tim Hudson <tjh@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/7544)

Configure

index bf0c2d5f973d1548ac30856e6bda8c37c8001deb..f46be6b4e58f855f7ac5af3b46c0d8fc3a6fbd5d 100755 (executable)
--- a/Configure
+++ b/Configure
@@ -2344,7 +2344,7 @@ EOF
             my %dirs = ();
             my $pd = dirname($product);
 
-            foreach (@{$unified_info{sources}->{$product}},
+            foreach (@{$unified_info{sources}->{$product} // []},
                      @{$unified_info{shared_sources}->{$product} // []}) {
                 my $d = dirname($_);