]> git.ipfire.org Git - thirdparty/openssl.git/commitdiff
util/mkrc.pl: Make sure FILEVERSION and PRODUCTVERSION have four numbers
authorRichard Levitte <levitte@openssl.org>
Sun, 15 Nov 2020 08:57:00 +0000 (09:57 +0100)
committerRichard Levitte <levitte@openssl.org>
Tue, 17 Nov 2020 12:18:16 +0000 (13:18 +0100)
Partially fixes #13414

Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/13415)

util/mkrc.pl

index d3617663eb855c8260eb9fc0b2221d74675c3fb3..6ec1f3747076809f79d1acc08889766b848d50fe 100755 (executable)
@@ -14,8 +14,10 @@ use configdata;
 my $cversion = "$config{version}";
 my $version = "$config{full_version}";
 
-# RC syntax for versions uses commas as separators, rather than period
-$cversion =~ s|\.|,|g;
+# RC syntax for versions uses commas as separators, rather than period,
+# and it must have exactly 4 numbers (16-bit integers).
+my @vernums = ( split(/\./, $cversion), 0, 0, 0, 0 );
+$cversion = join(',', @vernums[0..3]);
 
 my $filename = $ARGV[0];
 my $description = "OpenSSL library";