mirror of
https://github.com/QuasarApp/openssl.git
synced 2025-04-29 11:14:36 +00:00
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@openssl.org> (Merged from https://github.com/openssl/openssl/pull/8610)
This commit is contained in:
parent
9c98aa354d
commit
678d2681b2
@ -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.
|
||||
|
@ -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.
|
||||
|
@ -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.
|
||||
|
Loading…
x
Reference in New Issue
Block a user