[openssl] master update

Dr. Paul Dale pauli at openssl.org
Tue Jun 23 00:08:57 UTC 2020


The branch master has been updated
       via  1d78129dd205e3e85083a91c33540a70c51b0a23 (commit)
      from  3fd16304f4b33814ea481fe965d79675a5f4f2c3 (commit)


- Log -----------------------------------------------------------------
commit 1d78129dd205e3e85083a91c33540a70c51b0a23
Author: Tristan Bauer <67098820+trisbauer at users.noreply.github.com>
Date:   Thu Jun 18 11:45:24 2020 +0200

    Fix wrong return value check of mmap function
    
    The mmap function never returns NULL. If an error occurs, the function returns MAP_FAILED.
    
    CLA: trivial
    
    Reviewed-by: Tomas Mraz <tmraz at fedoraproject.org>
    Reviewed-by: Paul Dale <paul.dale at oracle.com>
    (Merged from https://github.com/openssl/openssl/pull/12187)

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

Summary of changes:
 crypto/mem_sec.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/crypto/mem_sec.c b/crypto/mem_sec.c
index e28a43e295..ddc0a370e6 100644
--- a/crypto/mem_sec.c
+++ b/crypto/mem_sec.c
@@ -514,7 +514,7 @@ static void sh_done(void)
     OPENSSL_free(sh.freelist);
     OPENSSL_free(sh.bittable);
     OPENSSL_free(sh.bitmalloc);
-    if (sh.map_result != NULL && sh.map_size)
+    if (sh.map_result != MAP_FAILED && sh.map_size)
         munmap(sh.map_result, sh.map_size);
     memset(&sh, 0, sizeof(sh));
 }


More information about the openssl-commits mailing list