Fixed use of uninitialized value in wc_BufferKeyDecrypt.

This commit is contained in:
Martin Kinčl
2019-05-16 16:37:31 +02:00
parent 6c713e4b88
commit 7a9d3db514

View File

@ -272,6 +272,8 @@ int wc_BufferKeyDecrypt(EncryptedInfo* info, byte* der, word32 derSz,
}
#endif
(void)XMEMSET(key, 0, WC_MAX_SYM_KEY_SIZE);
#ifndef NO_PWDBASED
if ((ret = wc_PBKDF1(key, password, passwordSz, info->iv, PKCS5_SALT_SZ, 1,
info->keySz, hashType)) != 0) {