From be36bcd52dccf0360856a4c221aea0887410b804 Mon Sep 17 00:00:00 2001 From: tb Date: Mon, 8 Jan 2024 03:32:01 +0000 Subject: [PATCH] Fix logic error (&& -> ||) CID 477172 --- lib/libcrypto/x509/x509_trs.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/libcrypto/x509/x509_trs.c b/lib/libcrypto/x509/x509_trs.c index 6e98eb27852..db5056dfd1b 100644 --- a/lib/libcrypto/x509/x509_trs.c +++ b/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; -- 2.20.1