From d3818c1a3eba6c43c06f96e0e13bebe51e14bb5a Mon Sep 17 00:00:00 2001 From: tb <> Date: Mon, 8 Jan 2024 03:32:01 +0000 Subject: Fix logic error (&& -> ||) CID 477172 --- src/lib/libcrypto/x509/x509_trs.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/lib/libcrypto/x509/x509_trs.c') diff --git a/src/lib/libcrypto/x509/x509_trs.c b/src/lib/libcrypto/x509/x509_trs.c index 6e98eb2785..db5056dfd1 100644 --- a/src/lib/libcrypto/x509/x509_trs.c +++ b/src/lib/libcrypto/x509/x509_trs.c @@ -1,4 +1,4 @@ -/* $OpenBSD: x509_trs.c,v 1.34 2024/01/07 16:22:46 tb Exp $ */ +/* $OpenBSD: x509_trs.c,v 1.35 2024/01/08 03:32:01 tb Exp $ */ /* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL * project 1999. */ @@ -195,7 +195,7 @@ X509_TRUST_get_by_id(int id) * Ensure the trust identifier is between MIN and MAX inclusive. * If so, translate it into an index into the trstandard[] table. */ - if (id < X509_TRUST_MIN && id > X509_TRUST_MAX) + if (id < X509_TRUST_MIN || id > X509_TRUST_MAX) return -1; return id - X509_TRUST_MIN; -- cgit v1.2.3-55-g6feb