We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 4ab0a87 + b4fa087 commit 54694f9Copy full SHA for 54694f9
1 file changed
wolfcrypt/benchmark/benchmark.c
@@ -17064,6 +17064,10 @@ void benchmark_configure(word32 block_size)
17064
/* must be greater than 0 */
17065
if (block_size > 0) {
17066
numBlocks = (int)((word32)numBlocks * bench_size / block_size);
17067
+ /* integer division can truncate to 0 for large block sizes; keep at
17068
+ * least one block so the algorithm actually runs. */
17069
+ if (numBlocks < 1)
17070
+ numBlocks = 1;
17071
bench_size = block_size;
17072
}
17073
0 commit comments