diff options
author | David Benjamin <davidben@google.com> | 2020-01-17 16:53:56 -0500 |
---|---|---|
committer | Tomas Mraz <tmraz@fedoraproject.org> | 2020-01-22 18:11:30 +0100 |
commit | 32be631ca1f2b73c92e4f7f5d23f1c3aee80ec69 (patch) | |
tree | 96311da5899ffe99a38af33e37d95f7426e80840 /crypto/poly1305 | |
parent | 3b740f6ec0562a97046277c8246b21163b1a7553 (diff) |
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 <levitte@openssl.org>
Reviewed-by: Tim Hudson <tjh@openssl.org>
Reviewed-by: Tomas Mraz <tmraz@fedoraproject.org>
(Merged from https://github.com/openssl/openssl/pull/10883)
Diffstat (limited to 'crypto/poly1305')
-rwxr-xr-x | crypto/poly1305/asm/poly1305-armv4.pl | 2 | ||||
-rwxr-xr-x | crypto/poly1305/asm/poly1305-armv8.pl | 2 | ||||
-rwxr-xr-x | crypto/poly1305/asm/poly1305-mips.pl | 2 | ||||
-rwxr-xr-x | crypto/poly1305/asm/poly1305-ppc.pl | 2 | ||||
-rwxr-xr-x | crypto/poly1305/asm/poly1305-ppcfp.pl | 2 | ||||
-rwxr-xr-x | crypto/poly1305/asm/poly1305-sparcv9.pl | 2 | ||||
-rwxr-xr-x | crypto/poly1305/asm/poly1305-x86.pl | 2 | ||||
-rwxr-xr-x | crypto/poly1305/asm/poly1305-x86_64.pl | 2 |
8 files changed, 8 insertions, 8 deletions
diff --git a/crypto/poly1305/asm/poly1305-armv4.pl b/crypto/poly1305/asm/poly1305-armv4.pl index 8d6049829d..2884cda771 100755 --- a/crypto/poly1305/asm/poly1305-armv4.pl +++ b/crypto/poly1305/asm/poly1305-armv4.pl @@ -1252,4 +1252,4 @@ foreach (split("\n",$code)) { print $_,"\n"; } -close STDOUT; # enforce flush +close STDOUT or die "error closing STDOUT"; # enforce flush diff --git a/crypto/poly1305/asm/poly1305-armv8.pl b/crypto/poly1305/asm/poly1305-armv8.pl index 5ebc57298e..d547f4e723 100755 --- a/crypto/poly1305/asm/poly1305-armv8.pl +++ b/crypto/poly1305/asm/poly1305-armv8.pl @@ -940,4 +940,4 @@ foreach (split("\n",$code)) { print $_,"\n"; } -close STDOUT; +close STDOUT or die "error closing STDOUT"; diff --git a/crypto/poly1305/asm/poly1305-mips.pl b/crypto/poly1305/asm/poly1305-mips.pl index a2504347c2..92deb0b0f9 100755 --- a/crypto/poly1305/asm/poly1305-mips.pl +++ b/crypto/poly1305/asm/poly1305-mips.pl @@ -437,5 +437,5 @@ ___ $output and open STDOUT,">$output"; print $code; -close STDOUT; +close STDOUT or die "error closing STDOUT"; diff --git a/crypto/poly1305/asm/poly1305-ppc.pl b/crypto/poly1305/asm/poly1305-ppc.pl index fa11afc6e0..980dcd3301 100755 --- a/crypto/poly1305/asm/poly1305-ppc.pl +++ b/crypto/poly1305/asm/poly1305-ppc.pl @@ -1978,4 +1978,4 @@ foreach (split("\n",$code)) { print $_,"\n"; } -close STDOUT; +close STDOUT or die "error closing STDOUT"; diff --git a/crypto/poly1305/asm/poly1305-ppcfp.pl b/crypto/poly1305/asm/poly1305-ppcfp.pl index 7109165667..78e1bf8546 100755 --- a/crypto/poly1305/asm/poly1305-ppcfp.pl +++ b/crypto/poly1305/asm/poly1305-ppcfp.pl @@ -740,4 +740,4 @@ ___ $code =~ s/\`([^\`]*)\`/eval $1/gem; print $code; -close STDOUT; +close STDOUT or die "error closing STDOUT"; diff --git a/crypto/poly1305/asm/poly1305-sparcv9.pl b/crypto/poly1305/asm/poly1305-sparcv9.pl index d7b67b8593..c80790423f 100755 --- a/crypto/poly1305/asm/poly1305-sparcv9.pl +++ b/crypto/poly1305/asm/poly1305-sparcv9.pl @@ -1116,4 +1116,4 @@ foreach (split("\n",$code)) { print $_,"\n"; } -close STDOUT; +close STDOUT or die "error closing STDOUT"; diff --git a/crypto/poly1305/asm/poly1305-x86.pl b/crypto/poly1305/asm/poly1305-x86.pl index 08b0da1a3b..b1c746617a 100755 --- a/crypto/poly1305/asm/poly1305-x86.pl +++ b/crypto/poly1305/asm/poly1305-x86.pl @@ -1811,4 +1811,4 @@ sub vlazy_reduction { &asm_finish(); -close STDOUT; +close STDOUT or die "error closing STDOUT"; diff --git a/crypto/poly1305/asm/poly1305-x86_64.pl b/crypto/poly1305/asm/poly1305-x86_64.pl index 8a469219b8..c03af53922 100755 --- a/crypto/poly1305/asm/poly1305-x86_64.pl +++ b/crypto/poly1305/asm/poly1305-x86_64.pl @@ -4182,4 +4182,4 @@ foreach (split('\n',$code)) { print $_,"\n"; } -close STDOUT; +close STDOUT or die "error closing STDOUT"; |