SILABS port: fix sizeof

A sizeof wasn't dereferencing a pointer using the sizeof the pointer and
not the actual struct. This is limited to setting the key for an AES
operation only when using SILABS SE2 acceleration.
This commit is contained in:
John Safranek
2022-02-17 08:47:50 -08:00
parent df0b516c68
commit 4361d1bdd2

View File

@ -48,7 +48,7 @@ int wc_AesSetKey(Aes* aes, const byte* userKey, word32 keylen,
return BUFFER_E;
}
XMEMSET(aes, 0, sizeof(aes));
XMEMSET(aes, 0, sizeof(*aes));
if (keylen > sizeof(aes->key)) {
return BAD_FUNC_ARG;