summaryrefslogtreecommitdiffstats
path: root/crypto/chacha
diff options
context:
space:
mode:
authorDavid Benjamin <davidben@google.com>2020-01-17 16:53:56 -0500
committerTomas Mraz <tmraz@fedoraproject.org>2020-01-22 18:11:30 +0100
commit32be631ca1f2b73c92e4f7f5d23f1c3aee80ec69 (patch)
tree96311da5899ffe99a38af33e37d95f7426e80840 /crypto/chacha
parent3b740f6ec0562a97046277c8246b21163b1a7553 (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/chacha')
-rwxr-xr-xcrypto/chacha/asm/chacha-armv4.pl2
-rwxr-xr-xcrypto/chacha/asm/chacha-armv8.pl2
-rwxr-xr-xcrypto/chacha/asm/chacha-c64xplus.pl2
-rw-r--r--crypto/chacha/asm/chacha-ia64.pl2
-rwxr-xr-xcrypto/chacha/asm/chacha-ppc.pl2
-rwxr-xr-xcrypto/chacha/asm/chacha-x86.pl2
-rwxr-xr-xcrypto/chacha/asm/chacha-x86_64.pl2
7 files changed, 7 insertions, 7 deletions
diff --git a/crypto/chacha/asm/chacha-armv4.pl b/crypto/chacha/asm/chacha-armv4.pl
index 8a9f6c4f19..021da300ee 100755
--- a/crypto/chacha/asm/chacha-armv4.pl
+++ b/crypto/chacha/asm/chacha-armv4.pl
@@ -1166,4 +1166,4 @@ foreach (split("\n",$code)) {
print $_,"\n";
}
-close STDOUT;
+close STDOUT or die "error closing STDOUT";
diff --git a/crypto/chacha/asm/chacha-armv8.pl b/crypto/chacha/asm/chacha-armv8.pl
index 7868389f71..466de51867 100755
--- a/crypto/chacha/asm/chacha-armv8.pl
+++ b/crypto/chacha/asm/chacha-armv8.pl
@@ -1289,4 +1289,4 @@ foreach (split("\n",$code)) {
print $_,"\n";
}
-close STDOUT; # flush
+close STDOUT or die "error closing STDOUT"; # flush
diff --git a/crypto/chacha/asm/chacha-c64xplus.pl b/crypto/chacha/asm/chacha-c64xplus.pl
index dfa89229b0..0b146288f7 100755
--- a/crypto/chacha/asm/chacha-c64xplus.pl
+++ b/crypto/chacha/asm/chacha-c64xplus.pl
@@ -922,4 +922,4 @@ $code.=<<___;
___
print $code;
-close STDOUT;
+close STDOUT or die "error closing STDOUT";
diff --git a/crypto/chacha/asm/chacha-ia64.pl b/crypto/chacha/asm/chacha-ia64.pl
index e3641426fc..9276dd0fbf 100644
--- a/crypto/chacha/asm/chacha-ia64.pl
+++ b/crypto/chacha/asm/chacha-ia64.pl
@@ -288,4 +288,4 @@ stringz "ChaCha20 for IA64, CRYPTOGAMS by \@dot-asm"
___
print $code;
-close STDOUT;
+close STDOUT or die "error closing STDOUT";
diff --git a/crypto/chacha/asm/chacha-ppc.pl b/crypto/chacha/asm/chacha-ppc.pl
index 1db31fa978..c9c4343517 100755
--- a/crypto/chacha/asm/chacha-ppc.pl
+++ b/crypto/chacha/asm/chacha-ppc.pl
@@ -1349,4 +1349,4 @@ foreach (split("\n",$code)) {
print $_,"\n";
}
-close STDOUT;
+close STDOUT or die "error closing STDOUT";
diff --git a/crypto/chacha/asm/chacha-x86.pl b/crypto/chacha/asm/chacha-x86.pl
index 566a8b79e6..6cf6968890 100755
--- a/crypto/chacha/asm/chacha-x86.pl
+++ b/crypto/chacha/asm/chacha-x86.pl
@@ -1151,4 +1151,4 @@ sub XOPROUND {
&asm_finish();
-close STDOUT;
+close STDOUT or die "error closing STDOUT";
diff --git a/crypto/chacha/asm/chacha-x86_64.pl b/crypto/chacha/asm/chacha-x86_64.pl
index fee0a963a9..25140104ce 100755
--- a/crypto/chacha/asm/chacha-x86_64.pl
+++ b/crypto/chacha/asm/chacha-x86_64.pl
@@ -4004,4 +4004,4 @@ foreach (split("\n",$code)) {
print $_,"\n";
}
-close STDOUT;
+close STDOUT or die "error closing STDOUT";