forked from wolfSSL/wolfssl
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:
@ -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;
|
||||
|
Reference in New Issue
Block a user