[openssl] master update

Dr. Paul Dale pauli at openssl.org
Sat Jun 19 05:46:05 UTC 2021


The branch master has been updated
       via  d7c88f760001fae2c608c1d10ae1539fba610288 (commit)
      from  d9ee027e898063d8b65d3bdbca3d903d7aff23a5 (commit)


- Log -----------------------------------------------------------------
commit d7c88f760001fae2c608c1d10ae1539fba610288
Author: Pauli <pauli at openssl.org>
Date:   Fri Jun 18 11:05:20 2021 +1000

    params: avoid using intmax_t since it's not well supported
    
    Converting doubles to integers used to go via intmax_t which isn't properly
    defined on some platforms.  The alternative is to go via int64_t.
    
    Fixes #15815
    Alternative to #15816
    
    Reviewed-by: Tomas Mraz <tomas at openssl.org>
    Reviewed-by: Richard Levitte <levitte at openssl.org>
    Reviewed-by: Matt Caswell <matt at openssl.org>
    (Merged from https://github.com/openssl/openssl/pull/15817)

-----------------------------------------------------------------------

Summary of changes:
 crypto/params.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/crypto/params.c b/crypto/params.c
index d9743633b0..a1db5dba26 100644
--- a/crypto/params.c
+++ b/crypto/params.c
@@ -1010,7 +1010,7 @@ int OSSL_PARAM_set_double(OSSL_PARAM *p, double val)
             return 1;
         }
     } else if (p->data_type == OSSL_PARAM_UNSIGNED_INTEGER
-               && val == (ossl_uintmax_t)val) {
+               && val == (uint64_t)val) {
         p->return_size = sizeof(double);
         if (p->data == NULL)
             return 1;
@@ -1035,7 +1035,7 @@ int OSSL_PARAM_set_double(OSSL_PARAM *p, double val)
                 return 1;
             }
             break;            }
-    } else if (p->data_type == OSSL_PARAM_INTEGER && val == (ossl_intmax_t)val) {
+    } else if (p->data_type == OSSL_PARAM_INTEGER && val == (int64_t)val) {
         p->return_size = sizeof(double);
         if (p->data == NULL)
             return 1;


More information about the openssl-commits mailing list