Skip to content

Commit

Permalink
Merge pull request #8326 from gasbytes/patch-rng-health-test-heap-hint
Browse files Browse the repository at this point in the history
Fix missing heap hint in RNG health test XMALLOC call
  • Loading branch information
JacobBarthelmeh authored Jan 27, 2025
2 parents f0fdc72 + d491e54 commit edd8355
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions wolfcrypt/src/random.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -2304,7 +2304,7 @@ static int wc_RNG_HealthTestLocal(int reseed, void* heap, int devId)
}

#ifdef WOLFSSL_SMALL_STACK
XFREE(check, NULL, DYNAMIC_TYPE_TMP_BUFFER);
XFREE(check, heap, DYNAMIC_TYPE_TMP_BUFFER);
#endif

return ret;
Expand Down

0 comments on commit edd8355

Please sign in to comment.