summaryrefslogtreecommitdiffstats
path: root/crypto
diff options
context:
space:
mode:
authorBernd Edlinger <bernd.edlinger@hotmail.de>2020-05-31 07:51:23 +0200
committerBernd Edlinger <bernd.edlinger@hotmail.de>2020-06-01 18:21:12 +0200
commit3fc83feae0bc3fcfbb7cfc8a927bb4a888a7663b (patch)
treee400516388cdb72ca268341543560f2b1a862a74 /crypto
parentec5aad1ca26599bcaddc3a03708fb925b21f3b6c (diff)
Revert the check for NaN in %f format
Unfortunately -Ofast seems to break that check. Fixes #11994 Reviewed-by: Paul Dale <paul.dale@oracle.com> (Merged from https://github.com/openssl/openssl/pull/12003) (cherry picked from commit 41dccd68b9b9b7622b26d264c5fa190aa5bd4201)
Diffstat (limited to 'crypto')
-rw-r--r--crypto/bio/b_print.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/crypto/bio/b_print.c b/crypto/bio/b_print.c
index 48556f72bc..2f68fe79cc 100644
--- a/crypto/bio/b_print.c
+++ b/crypto/bio/b_print.c
@@ -638,10 +638,8 @@ fmtfp(char **sbuffer,
/*
* By subtracting 65535 (2^16-1) we cancel the low order 15 bits
* of ULONG_MAX to avoid using imprecise floating point values.
- * The second condition is necessary to catch NaN values.
*/
- if (ufvalue >= (double)(ULONG_MAX - 65535) + 65536.0
- || !(ufvalue == ufvalue) /* NaN */) {
+ if (ufvalue >= (double)(ULONG_MAX - 65535) + 65536.0) {
/* Number too big */
return 0;
}