util/mkrc.pl: Make sure FILEVERSION and PRODUCTVERSION have four numbers

Partially fixes #13414

Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/13415)
This commit is contained in:
Richard Levitte 2020-11-15 09:57:00 +01:00
parent ef2a44eb31
commit c7d32b6ba5

View File

@ -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";