jitter: avoid a signed vs unsigned comparison

Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Shane Lontis <shane.lontis@oracle.com>
(Merged from https://github.com/openssl/openssl/pull/25498)
This commit is contained in:
Pauli 2024-09-19 08:39:20 +10:00
parent 6f08353a4b
commit 01ec59defd

View File

@ -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;
}