pass heap hint to init rng call

pull/749/head
JacobBarthelmeh 2024-11-07 16:47:29 -07:00
parent 5305170672
commit 8ec3bcaa25
1 changed files with 2 additions and 1 deletions

View File

@ -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);