Skip to content

Commit

Permalink
Merge pull request #749 from JacobBarthelmeh/static
Browse files Browse the repository at this point in the history
pass heap hint to init rng call
  • Loading branch information
douzzer authored Nov 9, 2024
2 parents 5305170 + 8ec3bca commit 9bbef7d
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 9bbef7d

Please sign in to comment.