summaryrefslogtreecommitdiffstats
path: root/crypto/perlasm
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/perlasm
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/perlasm')
-rwxr-xr-xcrypto/perlasm/arm-xlate.pl2
-rwxr-xr-xcrypto/perlasm/ppc-xlate.pl2
2 files changed, 2 insertions, 2 deletions
diff --git a/crypto/perlasm/arm-xlate.pl b/crypto/perlasm/arm-xlate.pl
index af6f7d3188..bee0523fef 100755
--- a/crypto/perlasm/arm-xlate.pl
+++ b/crypto/perlasm/arm-xlate.pl
@@ -191,4 +191,4 @@ while(my $line=<>) {
print "\n";
}
-close STDOUT;
+close STDOUT or die "error closing STDOUT";
diff --git a/crypto/perlasm/ppc-xlate.pl b/crypto/perlasm/ppc-xlate.pl
index 5fcd0526df..330510109c 100755
--- a/crypto/perlasm/ppc-xlate.pl
+++ b/crypto/perlasm/ppc-xlate.pl
@@ -343,4 +343,4 @@ while($line=<>) {
print "\n";
}
-close STDOUT;
+close STDOUT or die "error closing STDOUT";