diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/regress/lib/libcrypto/whirlpool/whirlpool_test.c | 6 | 
1 files changed, 4 insertions, 2 deletions
| diff --git a/src/regress/lib/libcrypto/whirlpool/whirlpool_test.c b/src/regress/lib/libcrypto/whirlpool/whirlpool_test.c index 940531d49a..809edbba16 100644 --- a/src/regress/lib/libcrypto/whirlpool/whirlpool_test.c +++ b/src/regress/lib/libcrypto/whirlpool/whirlpool_test.c | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: whirlpool_test.c,v 1.2 2024/04/09 18:08:43 tb Exp $ */ | 1 | /* $OpenBSD: whirlpool_test.c,v 1.3 2024/04/09 18:12:11 tb Exp $ */ | 
| 2 | /* | 2 | /* | 
| 3 | * Copyright (c) 2024 Joshua Sing <joshua@joshuasing.dev> | 3 | * Copyright (c) 2024 Joshua Sing <joshua@joshuasing.dev> | 
| 4 | * | 4 | * | 
| @@ -192,7 +192,9 @@ whirlpool_test(void) | |||
| 192 | } | 192 | } | 
| 193 | 193 | ||
| 194 | for (l = 0; l < wt->in_len;) { | 194 | for (l = 0; l < wt->in_len;) { | 
| 195 | in_len = arc4random_uniform(wt->in_len / 2); | 195 | in_len = 1; | 
| 196 | if (wt->in_len > 1) | ||
| 197 | in_len = arc4random_uniform(wt->in_len / 2); | ||
| 196 | if (in_len < 1) | 198 | if (in_len < 1) | 
| 197 | in_len = 1; | 199 | in_len = 1; | 
| 198 | if (in_len > wt->in_len - l) | 200 | if (in_len > wt->in_len - l) | 
