Skip to content

Commit 250e19a

Browse files
authored
Merge pull request #9299 from dgarske/bench_rsasz
Fix for improper sizing on `bench_rsa_helper`
2 parents f9b666d + 75097f3 commit 250e19a

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

wolfcrypt/benchmark/benchmark.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9003,25 +9003,25 @@ static void bench_rsa_helper(int useDeviceID,
90039003
WC_DECLARE_VAR(message, byte, TEST_STRING_SZ, HEAP_HINT);
90049004
#endif
90059005
WC_DECLARE_HEAP_ARRAY(enc, byte, BENCH_MAX_PENDING,
9006-
rsaKeySz, HEAP_HINT);
9006+
rsaKeySz/8, HEAP_HINT);
90079007

90089008
#if (!defined(WOLFSSL_RSA_VERIFY_INLINE) && \
90099009
!defined(WOLFSSL_RSA_PUBLIC_ONLY))
90109010
WC_DECLARE_HEAP_ARRAY(out, byte, BENCH_MAX_PENDING,
9011-
rsaKeySz, HEAP_HINT);
9011+
rsaKeySz/8, HEAP_HINT);
90129012
#else
90139013
byte* out[BENCH_MAX_PENDING];
90149014
#endif
90159015

90169016
XMEMSET(out, 0, sizeof(out));
90179017

90189018
WC_ALLOC_HEAP_ARRAY(enc, byte, BENCH_MAX_PENDING,
9019-
rsaKeySz, HEAP_HINT);
9019+
rsaKeySz/8, HEAP_HINT);
90209020

90219021
#if (!defined(WOLFSSL_RSA_VERIFY_INLINE) && \
90229022
!defined(WOLFSSL_RSA_PUBLIC_ONLY))
90239023
WC_ALLOC_HEAP_ARRAY(out, byte, BENCH_MAX_PENDING,
9024-
rsaKeySz, HEAP_HINT);
9024+
rsaKeySz/8, HEAP_HINT);
90259025
if (out[0] == NULL) {
90269026
ret = MEMORY_E;
90279027
goto exit;

0 commit comments

Comments
 (0)