Check early that the config target exists and isn't a template
authorRichard Levitte <levitte@openssl.org>
Tue, 7 Aug 2018 10:38:16 +0000 (12:38 +0200)
committerRichard Levitte <levitte@openssl.org>
Tue, 7 Aug 2018 15:19:38 +0000 (17:19 +0200)
Reviewed-by: Andy Polyakov <appro@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/6885)

Configure

index 9f728b9242123e671d2374ffad842fc7e1a60d54..059271275d74e85bdf4e12ff7aa4cda540e8a2bd 100755 (executable)
--- a/Configure
+++ b/Configure
@@ -1034,11 +1034,12 @@ if ($d) {
        $target = $t;
     }
 }
+
+&usage if !$table{$target} || $table{$target}->{template};
+
 $config{target} = $target;
 my %target = resolve_config($target);
 
-&usage if (!%target || $target{template});
-
 foreach (keys %target_attr_translate) {
     $target{$target_attr_translate{$_}} = $target{$_}
         if $target{$_};