From fb7899b29b9e7a2f6847b408260763f12398ccae Mon Sep 17 00:00:00 2001 From: Reda Chouk Date: Thu, 2 Jan 2025 12:35:52 +0100 Subject: [PATCH] Fix heap hint usage in wc_RNG_HealthTest Pass provided heap hint to XMALLOC instead of NULL in RNG health test function to ensure proper memory allocation with custom heap. --- wolfcrypt/src/random.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wolfcrypt/src/random.c b/wolfcrypt/src/random.c index febc29243f..375a61068e 100644 --- a/wolfcrypt/src/random.c +++ b/wolfcrypt/src/random.c @@ -2184,7 +2184,7 @@ static int wc_RNG_HealthTestLocal(int reseed, void* heap, int devId) #endif #ifdef WOLFSSL_SMALL_STACK - check = (byte*)XMALLOC(RNG_HEALTH_TEST_CHECK_SIZE, NULL, + check = (byte*)XMALLOC(RNG_HEALTH_TEST_CHECK_SIZE, heap, DYNAMIC_TYPE_TMP_BUFFER); if (check == NULL) { return MEMORY_E;