summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTheo Buehler <tb@cvs.openbsd.org>2024-01-08 03:32:02 +0000
committerTheo Buehler <tb@cvs.openbsd.org>2024-01-08 03:32:02 +0000
commit2408b0ab3098f1a62115ef68c48aaed6a374476c (patch)
tree289c8b6ee7063a3ab177769b4adc2b580398886d
parentbfb6657ecdd2f48bfc22ed3179c1f0dd56ca13dc (diff)
Fix logic error (&& -> ||)
CID 477172
-rw-r--r--lib/libcrypto/x509/x509_trs.c4
1 files 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;