From 54d9eac5c87b49e6b2fa7b089f4fc8722c8d69cf Mon Sep 17 00:00:00 2001 From: tb <> Date: Tue, 4 Jan 2022 20:23:05 +0000 Subject: 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 --- src/lib/libcrypto/x509/x509_addr.c | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) (limited to 'src') 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 @@ -/* $OpenBSD: x509_addr.c,v 1.53 2022/01/04 20:21:04 tb Exp $ */ +/* $OpenBSD: x509_addr.c,v 1.54 2022/01/04 20:23:05 tb Exp $ */ /* * Contributed to the OpenSSL Project by the American Registry for * Internet Numbers ("ARIN"). @@ -1090,19 +1090,12 @@ X509v3_addr_get_range(IPAddressOrRange *aor, const unsigned afi, { int afi_length; - if (aor == NULL || min == NULL || max == NULL) - return 0; - if ((afi_length = length_from_afi(afi)) == 0) return 0; if (length < afi_length) return 0; - if (aor->type != IPAddressOrRange_addressPrefix && - aor->type != IPAddressOrRange_addressRange) - return 0; - if (!extract_min_max(aor, min, max, afi_length)) return 0; -- cgit v1.2.3-55-g6feb