From 218e740f850f77c9f2720d56886eab166d1a6727 Mon Sep 17 00:00:00 2001 From: David Benjamin Date: Mon, 17 Feb 2020 12:21:27 +1000 Subject: Do not silently truncate files on perlasm errors If one of the perlasm xlate drivers crashes, OpenSSL's build will currently swallow the error and silently truncate the output to however far the driver got. This will hopefully fail to build, but better to check such things. Handle this by checking for errors when closing STDOUT (which is a pipe to the xlate driver). This is the OpenSSL 1.1.1 version of https://github.com/openssl/openssl/pull/10883 and https://github.com/openssl/openssl/pull/10930. Reviewed-by: Mark J. Cox Reviewed-by: Paul Dale David Benjamin (Merged from https://github.com/openssl/openssl/pull/10931) --- crypto/bn/asm/ia64-mont.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'crypto/bn/asm/ia64-mont.pl') diff --git a/crypto/bn/asm/ia64-mont.pl b/crypto/bn/asm/ia64-mont.pl index ec486f7779..3071a675f6 100644 --- a/crypto/bn/asm/ia64-mont.pl +++ b/crypto/bn/asm/ia64-mont.pl @@ -857,4 +857,4 @@ ___ open STDOUT,">$output" if $output; print $code; -close STDOUT; +close STDOUT or die "error closing STDOUT: $!"; -- cgit v1.2.3