Check correct allocation assignment. Thanks to R.A. for the report on ZD-5154

This commit is contained in:
kaleb-himes
2019-06-03 08:34:51 -06:00
parent 7624d90590
commit 80dd6cc143

View File

@@ -198,7 +198,7 @@ int wc_PBKDF2(byte* output, const byte* passwd, int pLen, const byte* salt,
if (buffer == NULL)
return MEMORY_E;
hmac = (Hmac*)XMALLOC(sizeof(Hmac), NULL, DYNAMIC_TYPE_HMAC);
if (buffer == NULL)
if (hmac == NULL)
return MEMORY_E;
#endif