forked from wolfSSL/wolfssl
recommit invalid free w/o smallstack
This commit is contained in:
@ -2201,8 +2201,10 @@ static int wolfssl_decrypt_buffer_key(buffer* der, byte* password,
|
|||||||
if ((ret = EVP_BytesToKey(info->name, "MD5", info->iv,
|
if ((ret = EVP_BytesToKey(info->name, "MD5", info->iv,
|
||||||
password, passwordSz, 1, key, iv)) <= 0) {
|
password, passwordSz, 1, key, iv)) <= 0) {
|
||||||
|
|
||||||
|
#ifdef WOLFSSL_SMALL_STACK
|
||||||
XFREE(key, NULL, DYNAMIC_TYPE_TMP_BUFFER);
|
XFREE(key, NULL, DYNAMIC_TYPE_TMP_BUFFER);
|
||||||
XFREE(iv, NULL, DYNAMIC_TYPE_TMP_BUFFER);
|
XFREE(iv, NULL, DYNAMIC_TYPE_TMP_BUFFER);
|
||||||
|
#endif
|
||||||
return ASN_INPUT_E;
|
return ASN_INPUT_E;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1908,7 +1908,7 @@ int chacha_test(void)
|
|||||||
byte plain[128];
|
byte plain[128];
|
||||||
byte sliver[64];
|
byte sliver[64];
|
||||||
byte input[] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0};
|
byte input[] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0};
|
||||||
word32 keySz;
|
word32 keySz = 32;
|
||||||
int ret = 0;
|
int ret = 0;
|
||||||
int i;
|
int i;
|
||||||
int times = 4;
|
int times = 4;
|
||||||
|
Reference in New Issue
Block a user