mirror of
https://github.com/wolfSSL/wolfssl.git
synced 2026-01-27 08:02:21 +01:00
Merge pull request #9514 from kareem-wolfssl/zd20936
Fix uninitialized variable, fix potentially undefined printf reference in HASH_DRBG_Generate.
This commit is contained in:
@@ -33365,7 +33365,7 @@ static int AddPSKtoPreMasterSecret(WOLFSSL* ssl)
|
||||
static void MakePSKPreMasterSecret(Arrays* arrays, byte use_psk_key)
|
||||
{
|
||||
byte* pms = arrays->preMasterSecret;
|
||||
word16 sz;
|
||||
word16 sz = 0;
|
||||
|
||||
/* sz + (use_psk_key ? sz 0s : sz unaltered) + length of psk + psk */
|
||||
if (!use_psk_key) {
|
||||
|
||||
@@ -631,9 +631,10 @@ static int Hash_DRBG_Generate(DRBG_internal* drbg, byte* out, word32 outSz)
|
||||
}
|
||||
|
||||
if (drbg->reseedCtr >= WC_RESEED_INTERVAL) {
|
||||
#if defined(DEBUG_WOLFSSL) || defined(DEBUG_DRBG_RESEEDS)
|
||||
printf("DRBG reseed triggered, reseedCtr == %lu",
|
||||
(unsigned long)drbg->reseedCtr);
|
||||
#if (defined(DEBUG_WOLFSSL) || defined(DEBUG_DRBG_RESEEDS)) && \
|
||||
defined(WOLFSSL_DEBUG_PRINTF)
|
||||
WOLFSSL_DEBUG_PRINTF("DRBG reseed triggered, reseedCtr == %lu",
|
||||
(unsigned long)drbg->reseedCtr);
|
||||
#endif
|
||||
return DRBG_NEED_RESEED;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user