[openssl] master update

Dr. Paul Dale pauli at openssl.org
Fri Mar 29 10:12:09 UTC 2019


The branch master has been updated
       via  678d2681b22c3968d1ff55ec09b9fece39641d57 (commit)
      from  9c98aa354df8b144a238346b63de8b82f04175dd (commit)


- Log -----------------------------------------------------------------
commit 678d2681b22c3968d1ff55ec09b9fece39641d57
Author: Pauli <paul.dale at oracle.com>
Date:   Fri Mar 29 17:46:11 2019 +1000

    Clear seed source structures.
    
    If the structures have empty padding bytes, ensure they are zeroed.
    These structures are added to seed pools as complete blocks including
    any padding and alignment bytes.
    
    Reviewed-by: Richard Levitte <levitte at openssl.org>
    (Merged from https://github.com/openssl/openssl/pull/8610)

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

Summary of changes:
 crypto/rand/rand_unix.c | 10 ++++++++--
 crypto/rand/rand_vms.c  | 10 ++++++++--
 crypto/rand/rand_win.c  | 10 ++++++++--
 3 files changed, 24 insertions(+), 6 deletions(-)

diff --git a/crypto/rand/rand_unix.c b/crypto/rand/rand_unix.c
index 39c4e7e..5d1e0d8 100644
--- a/crypto/rand/rand_unix.c
+++ b/crypto/rand/rand_unix.c
@@ -615,7 +615,10 @@ int rand_pool_add_nonce_data(RAND_POOL *pool)
         pid_t pid;
         CRYPTO_THREAD_ID tid;
         uint64_t time;
-    } data = { 0 };
+    } data;
+
+    /* Erase the entire structure including any padding */
+    memset(&data, 0, sizeof(data));
 
     /*
      * Add process id, thread id, and a high resolution timestamp to
@@ -634,7 +637,10 @@ int rand_pool_add_additional_data(RAND_POOL *pool)
     struct {
         CRYPTO_THREAD_ID tid;
         uint64_t time;
-    } data = { 0 };
+    } data;
+
+    /* Erase the entire structure including any padding */
+    memset(&data, 0, sizeof(data));
 
     /*
      * Add some noise from the thread id and a high resolution timer.
diff --git a/crypto/rand/rand_vms.c b/crypto/rand/rand_vms.c
index d35106a..3f13529 100644
--- a/crypto/rand/rand_vms.c
+++ b/crypto/rand/rand_vms.c
@@ -475,7 +475,10 @@ int rand_pool_add_nonce_data(RAND_POOL *pool)
         pid_t pid;
         CRYPTO_THREAD_ID tid;
         uint64_t time;
-    } data = { 0 };
+    } data;
+
+    /* Erase the entire structure including any padding */
+    memset(&data, 0, sizeof(data));
 
     /*
      * Add process id, thread id, and a high resolution timestamp
@@ -499,7 +502,10 @@ int rand_pool_add_additional_data(RAND_POOL *pool)
     struct {
         CRYPTO_THREAD_ID tid;
         uint64_t time;
-    } data = { 0 };
+    } data;
+
+    /* Erase the entire structure including any padding */
+    memset(&data, 0, sizeof(data));
 
     /*
      * Add some noise from the thread id and a high resolution timer.
diff --git a/crypto/rand/rand_win.c b/crypto/rand/rand_win.c
index ceeae37..278aee0 100644
--- a/crypto/rand/rand_win.c
+++ b/crypto/rand/rand_win.c
@@ -125,7 +125,10 @@ int rand_pool_add_nonce_data(RAND_POOL *pool)
         DWORD pid;
         DWORD tid;
         FILETIME time;
-    } data = { 0 };
+    } data;
+
+    /* Erase the entire structure including any padding */
+    memset(&data, 0, sizeof(data));
 
     /*
      * Add process id, thread id, and a high resolution timestamp to
@@ -144,7 +147,10 @@ int rand_pool_add_additional_data(RAND_POOL *pool)
     struct {
         DWORD tid;
         LARGE_INTEGER time;
-    } data = { 0 };
+    } data;
+
+    /* Erase the entire structure including any padding */
+    memset(&data, 0, sizeof(data));
 
     /*
      * Add some noise from the thread id and a high resolution timer.


More information about the openssl-commits mailing list