Skip to content

Commit 350706d

Browse files
authored
Merge pull request wolfSSL#9847 from embhorn/gh9846
Fix DRBG_internal alloc in wc_RNG_HealthTestLocal
2 parents 215fe13 + 42e5170 commit 350706d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

wolfcrypt/src/random.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1735,7 +1735,7 @@ static int wc_RNG_HealthTestLocal(WC_RNG* rng, int reseed, void* heap,
17351735

17361736
WC_ALLOC_VAR_EX(check, byte, RNG_HEALTH_TEST_CHECK_SIZE, heap,
17371737
DYNAMIC_TYPE_TMP_BUFFER, return MEMORY_E);
1738-
WC_ALLOC_VAR_EX(drbg, DRBG_internal, sizeof(DRBG_internal), heap,
1738+
WC_ALLOC_VAR_EX(drbg, DRBG_internal, 1, heap,
17391739
DYNAMIC_TYPE_TMP_BUFFER, WC_DO_NOTHING);
17401740
#ifdef WC_DECLARE_VAR_IS_HEAP_ALLOC
17411741
if (drbg == NULL) {

0 commit comments

Comments
 (0)