summaryrefslogtreecommitdiffstats
path: root/crypto/md5
diff options
context:
space:
mode:
authorDavid Benjamin <davidben@google.com>2020-01-17 22:53:56 +0100
committerTomas Mraz <tmraz@fedoraproject.org>2020-01-22 18:11:30 +0100
commit32be631ca1f2b73c92e4f7f5d23f1c3aee80ec69 (patch)
tree96311da5899ffe99a38af33e37d95f7426e80840 /crypto/md5
parentRussian Elbrus processors support (diff)
downloadopenssl-32be631ca1f2b73c92e4f7f5d23f1c3aee80ec69.tar.xz
openssl-32be631ca1f2b73c92e4f7f5d23f1c3aee80ec69.zip
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/md5')
-rw-r--r--crypto/md5/asm/md5-586.pl2
-rw-r--r--crypto/md5/asm/md5-sparcv9.pl2
-rwxr-xr-xcrypto/md5/asm/md5-x86_64.pl2
3 files changed, 3 insertions, 3 deletions
diff --git a/crypto/md5/asm/md5-586.pl b/crypto/md5/asm/md5-586.pl
index 74b82f02cd..b03bf11ed4 100644
--- a/crypto/md5/asm/md5-586.pl
+++ b/crypto/md5/asm/md5-586.pl
@@ -45,7 +45,7 @@ $X="esi";
&md5_block("md5_block_asm_data_order");
&asm_finish();
-close STDOUT;
+close STDOUT or die "error closing STDOUT";
sub Np
{
diff --git a/crypto/md5/asm/md5-sparcv9.pl b/crypto/md5/asm/md5-sparcv9.pl
index fd77b8b1de..9cf039656f 100644
--- a/crypto/md5/asm/md5-sparcv9.pl
+++ b/crypto/md5/asm/md5-sparcv9.pl
@@ -436,4 +436,4 @@ foreach (split("\n",$code)) {
print $_,"\n";
}
-close STDOUT;
+close STDOUT or die "error closing STDOUT";
diff --git a/crypto/md5/asm/md5-x86_64.pl b/crypto/md5/asm/md5-x86_64.pl
index c3d82455d1..99cbbea774 100755
--- a/crypto/md5/asm/md5-x86_64.pl
+++ b/crypto/md5/asm/md5-x86_64.pl
@@ -392,4 +392,4 @@ ___
print $code;
-close STDOUT;
+close STDOUT or die "error closing STDOUT";