[openssl-commits] [openssl] OpenSSL_1_1_1-stable update

Matt Caswell matt at openssl.org
Thu Feb 7 14:30:12 UTC 2019


The branch OpenSSL_1_1_1-stable has been updated
       via  e1cce612a6520555805c25be2539f231c22696d9 (commit)
      from  3b09585bd67c41445be4be8a84233e5d9a699264 (commit)


- Log -----------------------------------------------------------------
commit e1cce612a6520555805c25be2539f231c22696d9
Author: Matt Caswell <matt at openssl.org>
Date:   Tue Feb 5 14:25:18 2019 +0000

    Make OPENSSL_malloc_init() a no-op
    
    Making this a no-op removes a potential infinite loop than can occur in
    some situations.
    
    Fixes #2865
    
    Reviewed-by: Richard Levitte <levitte at openssl.org>
    (Merged from https://github.com/openssl/openssl/pull/8167)
    
    (cherry picked from commit ef45aa14c5af024fcb8bef1c9007f3d1c115bd85)

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

Summary of changes:
 doc/man3/OPENSSL_malloc.pod | 6 ++----
 include/openssl/crypto.h    | 9 ++-------
 2 files changed, 4 insertions(+), 11 deletions(-)

diff --git a/doc/man3/OPENSSL_malloc.pod b/doc/man3/OPENSSL_malloc.pod
index 049a125..57dc163 100644
--- a/doc/man3/OPENSSL_malloc.pod
+++ b/doc/man3/OPENSSL_malloc.pod
@@ -90,10 +90,8 @@ generally macro's that add the standard C B<__FILE__> and B<__LINE__>
 parameters and call a lower-level B<CRYPTO_xxx> API.
 Some functions do not add those parameters, but exist for consistency.
 
-OPENSSL_malloc_init() sets the lower-level memory allocation functions
-to their default implementation.
-It is generally not necessary to call this, except perhaps in certain
-shared-library situations.
+OPENSSL_malloc_init() does nothing and does not need to be called. It is
+included for compatibility with older versions of OpenSSL.
 
 OPENSSL_malloc(), OPENSSL_realloc(), and OPENSSL_free() are like the
 C malloc(), realloc(), and free() functions.
diff --git a/include/openssl/crypto.h b/include/openssl/crypto.h
index 150fc1a..22ad042 100644
--- a/include/openssl/crypto.h
+++ b/include/openssl/crypto.h
@@ -109,13 +109,8 @@ DEFINE_STACK_OF(void)
 # define CRYPTO_EX_INDEX_DRBG            15
 # define CRYPTO_EX_INDEX__COUNT          16
 
-/*
- * This is the default callbacks, but we can have others as well: this is
- * needed in Win32 where the application malloc and the library malloc may
- * not be the same.
- */
-#define OPENSSL_malloc_init() \
-    CRYPTO_set_mem_functions(CRYPTO_malloc, CRYPTO_realloc, CRYPTO_free)
+/* No longer needed, so this is a no-op */
+#define OPENSSL_malloc_init() while(0) continue
 
 int CRYPTO_mem_ctrl(int mode);
 


More information about the openssl-commits mailing list