From: Pauli Date: Wed, 18 Sep 2024 22:39:20 +0000 (+1000) Subject: jitter: avoid a signed vs unsigned comparison X-Git-Tag: openssl-3.5.0-alpha1~1030 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=01ec59defdbd6643ae881864097ec579ddf6dfb1;p=thirdparty%2Fopenssl.git jitter: avoid a signed vs unsigned comparison Reviewed-by: Tomas Mraz Reviewed-by: Shane Lontis (Merged from https://github.com/openssl/openssl/pull/25498) --- diff --git a/providers/implementations/rands/seed_src_jitter.c b/providers/implementations/rands/seed_src_jitter.c index 3dea0959d40..af8d5c4852d 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; }