Configure: Allow quoted values in VERSION
authorRichard Levitte <levitte@openssl.org>
Thu, 23 Apr 2020 16:59:10 +0000 (18:59 +0200)
committerRichard Levitte <levitte@openssl.org>
Sat, 25 Apr 2020 02:05:27 +0000 (04:05 +0200)
Fixes #11618

Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Tomas Mraz <tmraz@fedoraproject.org>
(Merged from https://github.com/openssl/openssl/pull/11624)

Configure

index 385dfce191f49635794f5685165bb208d08090dc..48ebe4eb838c25ba2d4fc1367f13cbb34f60899c 100755 (executable)
--- a/Configure
+++ b/Configure
@@ -286,7 +286,13 @@ collect_information(
     qr/\s*(\w+)\s*=\s*(.*?)\s*$/ =>
         sub {
             # Only define it if there is a value at all
-            $version{uc $1} = $2 if $2 ne '';
+            if ($2 ne '') {
+                my $k = $1;
+                my $v = $2;
+                # Some values are quoted.  Trim the quotes
+                $v = $1 if $v =~ /^"(.*)"$/;
+                $version{uc $k} = $v;
+            }
         },
     "OTHERWISE" =>
         sub { die "Something wrong with this line:\n$_\nin $srcdir/VERSION" },