summaryrefslogtreecommitdiffstats
path: root/util
diff options
context:
space:
mode:
authorRichard Levitte <levitte@openssl.org>2020-11-15 09:57:00 +0100
committerRichard Levitte <levitte@openssl.org>2020-11-17 13:18:16 +0100
commitc7d32b6ba520461103015022d8b4095573ca9691 (patch)
tree25e306d1c48e68a18c486288655cd14b7068a32c /util
parentef2a44eb31c88b47bca914295b229a9bd1658145 (diff)
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)
Diffstat (limited to 'util')
-rwxr-xr-xutil/mkrc.pl6
1 files changed, 4 insertions, 2 deletions
diff --git a/util/mkrc.pl b/util/mkrc.pl
index d3617663eb..6ec1f37470 100755
--- a/util/mkrc.pl
+++ b/util/mkrc.pl
@@ -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";