Skip to content

Commit

Permalink
pass heap hint to init rng call
Browse files Browse the repository at this point in the history
  • Loading branch information
JacobBarthelmeh committed Nov 7, 2024
1 parent 5305170 commit 8ec3bca
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/internal.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 8ec3bca

Please sign in to comment.