diff --git a/providers/implementations/rands/seed_src_jitter.c b/providers/implementations/rands/seed_src_jitter.c index 3dea0959d4..af8d5c4852 100644 --- a/providers/implementations/rands/seed_src_jitter.c +++ b/providers/implementations/rands/seed_src_jitter.c @@ -104,7 +104,7 @@ static size_t get_jitter_random_value(PROV_JITTER *s, break; /* Success */ - if (result == len) + if (result >= 0 && (size_t)result == len) return len; }