mirror of
https://github.com/wolfSSL/wolfssl.git
synced 2025-08-01 03:34:39 +02:00
memset structures to 0 in Init functions
This commit is contained in:
@@ -19104,6 +19104,7 @@ void wolfSSL_BN_CTX_free(WOLFSSL_BN_CTX* ctx)
|
||||
static void InitwolfSSL_BigNum(WOLFSSL_BIGNUM* bn)
|
||||
{
|
||||
if (bn) {
|
||||
XMEMSET(bn, 0, sizeof(WOLFSSL_BIGNUM));
|
||||
bn->neg = 0;
|
||||
bn->internal = NULL;
|
||||
}
|
||||
@@ -20446,6 +20447,7 @@ void wolfSSL_DSA_free(WOLFSSL_DSA* dsa)
|
||||
static void InitwolfSSL_Rsa(WOLFSSL_RSA* rsa)
|
||||
{
|
||||
if (rsa) {
|
||||
XMEMSET(rsa, 0, sizeof(WOLFSSL_RSA));
|
||||
rsa->n = NULL;
|
||||
rsa->e = NULL;
|
||||
rsa->d = NULL;
|
||||
|
@@ -218,6 +218,10 @@ int wc_InitRsaKey_ex(RsaKey* key, void* heap, int devId)
|
||||
return BAD_FUNC_ARG;
|
||||
}
|
||||
|
||||
(void)devId;
|
||||
|
||||
XMEMSET(key, 0, sizeof(RsaKey));
|
||||
|
||||
key->type = RSA_TYPE_UNKNOWN;
|
||||
key->state = RSA_STATE_NONE;
|
||||
key->heap = heap;
|
||||
|
Reference in New Issue
Block a user