aboutsummaryrefslogtreecommitdiff
path: root/crypto/camellia
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/camellia
parent3b740f6ec0562a97046277c8246b21163b1a7553 (diff)
downloadopenssl-32be631ca1f2b73c92e4f7f5d23f1c3aee80ec69.zip
openssl-32be631ca1f2b73c92e4f7f5d23f1c3aee80ec69.tar.gz
openssl-32be631ca1f2b73c92e4f7f5d23f1c3aee80ec69.tar.bz2
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/camellia')
-rw-r--r--crypto/camellia/asm/cmll-x86.pl2
-rw-r--r--crypto/camellia/asm/cmll-x86_64.pl2
-rw-r--r--crypto/camellia/asm/cmllt4-sparcv9.pl2
3 files changed, 3 insertions, 3 deletions
diff --git a/crypto/camellia/asm/cmll-x86.pl b/crypto/camellia/asm/cmll-x86.pl
index 1a3ec88..d1e522f 100644
--- a/crypto/camellia/asm/cmll-x86.pl
+++ b/crypto/camellia/asm/cmll-x86.pl
@@ -1146,4 +1146,4 @@ my ($s0,$s1,$s2,$s3) = @T;
&asm_finish();
-close STDOUT;
+close STDOUT or die "error closing STDOUT";
diff --git a/crypto/camellia/asm/cmll-x86_64.pl b/crypto/camellia/asm/cmll-x86_64.pl
index d0a45f2..6865e73 100644
--- a/crypto/camellia/asm/cmll-x86_64.pl
+++ b/crypto/camellia/asm/cmll-x86_64.pl
@@ -1152,4 +1152,4 @@ ___
$code =~ s/\`([^\`]*)\`/eval $1/gem;
print $code;
-close STDOUT;
+close STDOUT or die "error closing STDOUT";
diff --git a/crypto/camellia/asm/cmllt4-sparcv9.pl b/crypto/camellia/asm/cmllt4-sparcv9.pl
index 0b3448e..9548917 100644
--- a/crypto/camellia/asm/cmllt4-sparcv9.pl
+++ b/crypto/camellia/asm/cmllt4-sparcv9.pl
@@ -935,4 +935,4 @@ ___
&emit_assembler();
-close STDOUT;
+close STDOUT or die "error closing STDOUT";