From b379de41198352b9d6d2e40ff374382edf0cc916 Mon Sep 17 00:00:00 2001 From: kaleb-himes Date: Wed, 5 Nov 2025 10:28:19 -0700 Subject: [PATCH] Addressing a bug in the test logic --- tests/api/test_random.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/api/test_random.c b/tests/api/test_random.c index 6f77cc11e..fa7c820c9 100644 --- a/tests/api/test_random.c +++ b/tests/api/test_random.c @@ -114,7 +114,7 @@ int test_wc_RNG_GenerateBlock(void) ExpectIntEQ(wc_RNG_GenerateBlock(NULL, key , sizeof(key)), WC_NO_ERR_TRACE(BAD_FUNC_ARG)); - for (i = 0; i <= (int)sizeof(key); i++) { + for (i = 0; i < (int)sizeof(key); i++) { ExpectIntEQ(wc_RNG_GenerateBlock(&rng, key + i, sizeof(key) - i), 0); } DoExpectIntEQ(wc_FreeRng(&rng), 0);