From 80dd6cc143c3be518b4972221623322069de456f Mon Sep 17 00:00:00 2001 From: kaleb-himes Date: Mon, 3 Jun 2019 08:34:51 -0600 Subject: [PATCH] Check correct allocation assignment. Thanks to R.A. for the report on ZD-5154 --- wolfcrypt/src/pwdbased.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wolfcrypt/src/pwdbased.c b/wolfcrypt/src/pwdbased.c index e0edf6e3a..7cf18ceb1 100644 --- a/wolfcrypt/src/pwdbased.c +++ b/wolfcrypt/src/pwdbased.c @@ -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