From 8ec3bcaa25b7d2fa379d7ab6d8a42d66246ba313 Mon Sep 17 00:00:00 2001 From: JacobBarthelmeh Date: Thu, 7 Nov 2024 16:47:29 -0700 Subject: [PATCH] pass heap hint to init rng call --- src/internal.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/internal.c b/src/internal.c index 64445967..52fe4eef 100644 --- a/src/internal.c +++ b/src/internal.c @@ -993,7 +993,8 @@ WOLFSSH* SshInit(WOLFSSH* ssh, WOLFSSH_CTX* ctx) handshake = HandshakeInfoNew(heap); rng = (WC_RNG*)WMALLOC(sizeof(WC_RNG), heap, DYNTYPE_RNG); - if (handshake == NULL || rng == NULL || wc_InitRng(rng) != 0) { + if (handshake == NULL || rng == NULL || + wc_InitRng_ex(rng, heap, INVALID_DEVID) != 0) { WLOG(WS_LOG_DEBUG, "SshInit: Cannot allocate memory.\n"); WFREE(handshake, heap, DYNTYPE_HS);