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/rc4 | |
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/rc4')
-rw-r--r-- | crypto/rc4/asm/rc4-586.pl | 2 | ||||
-rw-r--r-- | crypto/rc4/asm/rc4-c64xplus.pl | 2 | ||||
-rw-r--r-- | crypto/rc4/asm/rc4-md5-x86_64.pl | 2 | ||||
-rw-r--r-- | crypto/rc4/asm/rc4-parisc.pl | 2 | ||||
-rw-r--r-- | crypto/rc4/asm/rc4-s390x.pl | 2 | ||||
-rwxr-xr-x | crypto/rc4/asm/rc4-x86_64.pl | 2 |
6 files changed, 6 insertions, 6 deletions
diff --git a/crypto/rc4/asm/rc4-586.pl b/crypto/rc4/asm/rc4-586.pl index ad9674070d..79068ffdce 100644 --- a/crypto/rc4/asm/rc4-586.pl +++ b/crypto/rc4/asm/rc4-586.pl @@ -422,4 +422,4 @@ $idx="edx"; &asm_finish(); -close STDOUT; +close STDOUT or die "error closing STDOUT"; diff --git a/crypto/rc4/asm/rc4-c64xplus.pl b/crypto/rc4/asm/rc4-c64xplus.pl index 0167b05e6a..2c998d5035 100644 --- a/crypto/rc4/asm/rc4-c64xplus.pl +++ b/crypto/rc4/asm/rc4-c64xplus.pl @@ -188,4 +188,4 @@ ___ $output = pop and open STDOUT,">$output"; print $code; -close STDOUT; +close STDOUT or die "error closing STDOUT"; diff --git a/crypto/rc4/asm/rc4-md5-x86_64.pl b/crypto/rc4/asm/rc4-md5-x86_64.pl index 560eb4c432..853e6d6d17 100644 --- a/crypto/rc4/asm/rc4-md5-x86_64.pl +++ b/crypto/rc4/asm/rc4-md5-x86_64.pl @@ -662,4 +662,4 @@ $code =~ s/#rc4#//gm if ($rc4); print $code; -close STDOUT; +close STDOUT or die "error closing STDOUT"; diff --git a/crypto/rc4/asm/rc4-parisc.pl b/crypto/rc4/asm/rc4-parisc.pl index a60f2f9ea5..30a8bb505e 100644 --- a/crypto/rc4/asm/rc4-parisc.pl +++ b/crypto/rc4/asm/rc4-parisc.pl @@ -333,4 +333,4 @@ foreach(split("\n",$code)) { print $_,"\n"; } -close STDOUT; +close STDOUT or die "error closing STDOUT"; diff --git a/crypto/rc4/asm/rc4-s390x.pl b/crypto/rc4/asm/rc4-s390x.pl index 8214b488c6..f6d3401c93 100644 --- a/crypto/rc4/asm/rc4-s390x.pl +++ b/crypto/rc4/asm/rc4-s390x.pl @@ -240,4 +240,4 @@ RC4_options: ___ print $code; -close STDOUT; # force flush +close STDOUT or die "error closing STDOUT"; # force flush diff --git a/crypto/rc4/asm/rc4-x86_64.pl b/crypto/rc4/asm/rc4-x86_64.pl index 9572f77378..b86425e582 100755 --- a/crypto/rc4/asm/rc4-x86_64.pl +++ b/crypto/rc4/asm/rc4-x86_64.pl @@ -700,4 +700,4 @@ $code =~ s/\`([^\`]*)\`/eval $1/gem; print $code; -close STDOUT; +close STDOUT or die "error closing STDOUT"; |