Commit 8920a41604 for openssl.org
commit 8920a41604ba568b8bf3f41cc28589098f75f844
Author: Bob Beck <beck@openssl.org>
Date: Fri Aug 7 18:59:41 2026 -0600
Strip the line ending from continuation lines in the mkerr state
Long reason strings in openssl.txt are stored on a continuation
line, which was read without stripping its line ending; the greedy
whitespace trim kept the carriage return on a CRLF checkout, and
the emitted string then carried a bare CR, which compilers treat
as a line ending inside the literal.
Reviewed-by: Neil Horman <nhorman@openssl.org>
Reviewed-by: Andrew Dinh <andrewd@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.foundation>
Merge-date: Tue Sep 1 14:03:08 2026
Merged-from: https://github.com/openssl/openssl/pull/32243
diff --git a/util/mkerr.pl b/util/mkerr.pl
index b90cf86cbc..16555d4a60 100755
--- a/util/mkerr.pl
+++ b/util/mkerr.pl
@@ -244,6 +244,9 @@ if ( ! $reindex && $statefile ) {
$name = $1;
$code = $2;
my $next = <STATE>;
+
+ $next =~ s|\R$||; # Better chomp, as above; the greedy
+ # trim below would keep a \r
$next =~ s/^\s*(.*)\s*$/$1/;
die "Duplicate define $name" if exists $strings{$name};
$strings{$name} = $next;