diff options
| author | tb <> | 2024-01-08 03:32:01 +0000 |
|---|---|---|
| committer | tb <> | 2024-01-08 03:32:01 +0000 |
| commit | d3818c1a3eba6c43c06f96e0e13bebe51e14bb5a (patch) | |
| tree | ca72119d541f67b1128e3448b640a26b03cfbcaf /src/lib | |
| parent | e79940850bf23aec2064588c97c2897657f49170 (diff) | |
| download | openbsd-d3818c1a3eba6c43c06f96e0e13bebe51e14bb5a.tar.gz openbsd-d3818c1a3eba6c43c06f96e0e13bebe51e14bb5a.tar.bz2 openbsd-d3818c1a3eba6c43c06f96e0e13bebe51e14bb5a.zip | |
Fix logic error (&& -> ||)
CID 477172
Diffstat (limited to 'src/lib')
| -rw-r--r-- | src/lib/libcrypto/x509/x509_trs.c | 4 |
1 files changed, 2 insertions, 2 deletions
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 @@ | |||
| 1 | /* $OpenBSD: x509_trs.c,v 1.34 2024/01/07 16:22:46 tb Exp $ */ | 1 | /* $OpenBSD: x509_trs.c,v 1.35 2024/01/08 03:32:01 tb Exp $ */ |
| 2 | /* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL | 2 | /* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL |
| 3 | * project 1999. | 3 | * project 1999. |
| 4 | */ | 4 | */ |
| @@ -195,7 +195,7 @@ X509_TRUST_get_by_id(int id) | |||
| 195 | * Ensure the trust identifier is between MIN and MAX inclusive. | 195 | * Ensure the trust identifier is between MIN and MAX inclusive. |
| 196 | * If so, translate it into an index into the trstandard[] table. | 196 | * If so, translate it into an index into the trstandard[] table. |
| 197 | */ | 197 | */ |
| 198 | if (id < X509_TRUST_MIN && id > X509_TRUST_MAX) | 198 | if (id < X509_TRUST_MIN || id > X509_TRUST_MAX) |
| 199 | return -1; | 199 | return -1; |
| 200 | 200 | ||
| 201 | return id - X509_TRUST_MIN; | 201 | return id - X509_TRUST_MIN; |
