diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/lib/libcrypto/x509/x509_addr.c | 19 |
1 files changed, 7 insertions, 12 deletions
diff --git a/src/lib/libcrypto/x509/x509_addr.c b/src/lib/libcrypto/x509/x509_addr.c index a9e10bff3b..8794180535 100644 --- a/src/lib/libcrypto/x509/x509_addr.c +++ b/src/lib/libcrypto/x509/x509_addr.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: x509_addr.c,v 1.74 2022/01/05 17:55:33 tb Exp $ */ | 1 | /* $OpenBSD: x509_addr.c,v 1.75 2022/01/05 18:01:27 tb Exp $ */ |
2 | /* | 2 | /* |
3 | * Contributed to the OpenSSL Project by the American Registry for | 3 | * Contributed to the OpenSSL Project by the American Registry for |
4 | * Internet Numbers ("ARIN"). | 4 | * Internet Numbers ("ARIN"). |
@@ -1358,17 +1358,12 @@ IPAddressOrRanges_canonize(IPAddressOrRanges *aors, const unsigned afi) | |||
1358 | /* | 1358 | /* |
1359 | * Check for inverted final range. | 1359 | * Check for inverted final range. |
1360 | */ | 1360 | */ |
1361 | j = sk_IPAddressOrRange_num(aors) - 1; | 1361 | a = sk_IPAddressOrRange_value(aors, i); |
1362 | { | 1362 | if (a != NULL && a->type == IPAddressOrRange_addressRange) { |
1363 | IPAddressOrRange *a = sk_IPAddressOrRange_value(aors, j); | 1363 | if (!extract_min_max(a, a_min, a_max, length)) |
1364 | if (a != NULL && a->type == IPAddressOrRange_addressRange) { | 1364 | return 0; |
1365 | unsigned char a_min[ADDR_RAW_BUF_LEN], | 1365 | if (memcmp(a_min, a_max, length) > 0) |
1366 | a_max[ADDR_RAW_BUF_LEN]; | 1366 | return 0; |
1367 | if (!extract_min_max(a, a_min, a_max, length)) | ||
1368 | return 0; | ||
1369 | if (memcmp(a_min, a_max, length) > 0) | ||
1370 | return 0; | ||
1371 | } | ||
1372 | } | 1367 | } |
1373 | 1368 | ||
1374 | return 1; | 1369 | return 1; |