memset structures to 0 in Init functions

This commit is contained in:
Jacob Barthelmeh
2017-01-25 18:06:25 -07:00
parent 340963742a
commit 8928160df7
2 changed files with 6 additions and 0 deletions
+4
View File
@@ -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;