diff options
author | Richard Levitte <levitte@openssl.org> | 2016-09-21 01:49:04 +0200 |
---|---|---|
committer | Richard Levitte <levitte@openssl.org> | 2016-09-21 01:49:04 +0200 |
commit | f6be8315cbdb4173008b5917d2b0fc80bb0bf06b (patch) | |
tree | c3ef56bab4b68a9f3ba2869949b9a9a49107b553 /util/dofile.pl | |
parent | 5a008ff6c559739a59188e11f32da99028302647 (diff) | |
download | openssl-f6be8315cbdb4173008b5917d2b0fc80bb0bf06b.zip openssl-f6be8315cbdb4173008b5917d2b0fc80bb0bf06b.tar.gz openssl-f6be8315cbdb4173008b5917d2b0fc80bb0bf06b.tar.bz2 |
util/dofile.pl: report if a template couldn't be loaded
Reviewed-by: Rich Salz <rsalz@openssl.org>
Diffstat (limited to 'util/dofile.pl')
-rw-r--r-- | util/dofile.pl | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/util/dofile.pl b/util/dofile.pl index e0333fe..8b0c7b4 100644 --- a/util/dofile.pl +++ b/util/dofile.pl @@ -159,7 +159,11 @@ my @autowarntext = ("WARNING: do not edit!", my $prev_linecount = 0; my $text = @ARGV - ? join("", map { my $x = "{- output_reset_on() -}".Text::Template::_load_text($_); + ? join("", map { my $x = Text::Template::_load_text($_); + if (!defined($x)) { + die $Text::Template::ERROR, "\n"; + } + $x = "{- output_reset_on() -}" . $x; my $linecount = $x =~ tr/\n//; $prev_linecount = ($linecount += $prev_linecount); $lines{$linecount} = $_; |