From 278de77b881739267d86f96088557af3da966982 Mon Sep 17 00:00:00 2001 From: Richard Levitte Date: Sun, 1 Dec 2019 08:20:09 +0100 Subject: [PATCH] configdata.pm.in: Don't try to quotify undefined values Fixes #10503 Reviewed-by: Matthias St. Pierre (Merged from https://github.com/openssl/openssl/pull/10548) --- configdata.pm.in | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/configdata.pm.in b/configdata.pm.in index 312122686f..71627b48ef 100644 --- a/configdata.pm.in +++ b/configdata.pm.in @@ -245,7 +245,13 @@ _____ foreach (sort keys %target) { next if $_ =~ m|^_| || $_ eq 'template'; my $quotify = sub { - map { (my $x = $_) =~ s|([\\\$\@"])|\\$1|g; "\"$x\""} @_; + map { + if (defined $_) { + (my $x = $_) =~ s|([\\\$\@"])|\\$1|g; "\"$x\"" + } else { + "undef"; + } + } @_; }; print ' ', $_, ' => '; if (ref($target{$_}) eq "ARRAY") { -- 2.25.1