From 32be631ca1f2b73c92e4f7f5d23f1c3aee80ec69 Mon Sep 17 00:00:00 2001 From: David Benjamin Date: Fri, 17 Jan 2020 16:53:56 -0500 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). Reviewed-by: Richard Levitte Reviewed-by: Tim Hudson Reviewed-by: Tomas Mraz (Merged from https://github.com/openssl/openssl/pull/10883) --- crypto/bn/asm/x86_64-mont.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'crypto/bn/asm/x86_64-mont.pl') diff --git a/crypto/bn/asm/x86_64-mont.pl b/crypto/bn/asm/x86_64-mont.pl index 9e425b227b..bcc0f83ec0 100755 --- a/crypto/bn/asm/x86_64-mont.pl +++ b/crypto/bn/asm/x86_64-mont.pl @@ -1591,4 +1591,4 @@ ___ } print $code; -close STDOUT; +close STDOUT or die "error closing STDOUT"; -- cgit v1.2.3