From c912e0c61682864a05d04273b141270084aa4df4 Mon Sep 17 00:00:00 2001 From: Pauli Date: Wed, 2 Jun 2021 10:37:10 +1000 Subject: [PATCH] util: update FIPS checksumming script to be more aggressive with whitespace Fixes #15562 Reviewed-by: Richard Levitte (Merged from https://github.com/openssl/openssl/pull/15574) --- util/lang-compress.pl | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/util/lang-compress.pl b/util/lang-compress.pl index 6898877587..ddf1d1ec6f 100755 --- a/util/lang-compress.pl +++ b/util/lang-compress.pl @@ -80,15 +80,7 @@ if ($lang eq 'C') { s{ (?| # All things preserved end up in $1 - (\n)\h+ # Spaces at start of lines removed - - | - - \h+(\n) # Spaces at end of lines removed - - | - - \h+ # Other horizontal spaces replaced with one + \h+ # Horizontal spaces replaced with one | # OR @@ -104,6 +96,10 @@ if ($lang eq 'C') { } defined $1 ? $1 : " " }gsxe; + + # Clean up spaces at start and end of lines + s/^ //mg; + s/ $//mg; } elsif ($lang eq 'S') { # Because we use C++ style comments in our .S files, all we can do # is to drop them