diff options
| author | tb <> | 2022-01-04 20:23:05 +0000 |
|---|---|---|
| committer | tb <> | 2022-01-04 20:23:05 +0000 |
| commit | 34783ca0f3627b4152afd30f7a0988658ca1486c (patch) | |
| tree | 6b341802a8df5f55f5cbcd17a00c9f2a0d9fc448 /src/lib/libc | |
| parent | 173a4caaa2d26451278da22392bea6a39cfb0b9c (diff) | |
| download | openbsd-34783ca0f3627b4152afd30f7a0988658ca1486c.tar.gz openbsd-34783ca0f3627b4152afd30f7a0988658ca1486c.tar.bz2 openbsd-34783ca0f3627b4152afd30f7a0988658ca1486c.zip | |
Remove checks that are duplicated in extract_min_max()
The NULL checks and the checks that aor->type is reasonable are already
performed in extract_min_max(), so it is unnecessary to repeat them
in X509v3_addr_get_range()
ok inoguchi jsing
Diffstat (limited to '')
| -rw-r--r-- | src/lib/libcrypto/x509/x509_addr.c | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/src/lib/libcrypto/x509/x509_addr.c b/src/lib/libcrypto/x509/x509_addr.c index f6dbb3a9c1..d3cdebba25 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.53 2022/01/04 20:21:04 tb Exp $ */ | 1 | /* $OpenBSD: x509_addr.c,v 1.54 2022/01/04 20:23:05 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"). |
| @@ -1090,19 +1090,12 @@ X509v3_addr_get_range(IPAddressOrRange *aor, const unsigned afi, | |||
| 1090 | { | 1090 | { |
| 1091 | int afi_length; | 1091 | int afi_length; |
| 1092 | 1092 | ||
| 1093 | if (aor == NULL || min == NULL || max == NULL) | ||
| 1094 | return 0; | ||
| 1095 | |||
| 1096 | if ((afi_length = length_from_afi(afi)) == 0) | 1093 | if ((afi_length = length_from_afi(afi)) == 0) |
| 1097 | return 0; | 1094 | return 0; |
| 1098 | 1095 | ||
| 1099 | if (length < afi_length) | 1096 | if (length < afi_length) |
| 1100 | return 0; | 1097 | return 0; |
| 1101 | 1098 | ||
| 1102 | if (aor->type != IPAddressOrRange_addressPrefix && | ||
| 1103 | aor->type != IPAddressOrRange_addressRange) | ||
| 1104 | return 0; | ||
| 1105 | |||
| 1106 | if (!extract_min_max(aor, min, max, afi_length)) | 1099 | if (!extract_min_max(aor, min, max, afi_length)) |
| 1107 | return 0; | 1100 | return 0; |
| 1108 | 1101 | ||
