From c7d32b6ba520461103015022d8b4095573ca9691 Mon Sep 17 00:00:00 2001 From: Richard Levitte Date: Sun, 15 Nov 2020 09:57:00 +0100 Subject: [PATCH] util/mkrc.pl: Make sure FILEVERSION and PRODUCTVERSION have four numbers Partially fixes #13414 Reviewed-by: Matt Caswell (Merged from https://github.com/openssl/openssl/pull/13415) --- util/mkrc.pl | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/util/mkrc.pl b/util/mkrc.pl index d3617663eb855..6ec1f37470768 100755 --- a/util/mkrc.pl +++ b/util/mkrc.pl @@ -14,8 +14,10 @@ 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";