From f2de96f0dd9bc355ee08c9dc1cfd3481b72997f3 Mon Sep 17 00:00:00 2001 From: tb Date: Fri, 24 Dec 2021 10:09:44 +0000 Subject: [PATCH] Fix a typo in a comment and add some empty lines for readability --- lib/libcrypto/x509/x509_addr.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/lib/libcrypto/x509/x509_addr.c b/lib/libcrypto/x509/x509_addr.c index 5512f310e12..db9ea089f67 100644 --- a/lib/libcrypto/x509/x509_addr.c +++ b/lib/libcrypto/x509/x509_addr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: x509_addr.c,v 1.24 2021/12/24 02:02:37 tb Exp $ */ +/* $OpenBSD: x509_addr.c,v 1.25 2021/12/24 10:09:44 tb Exp $ */ /* * Contributed to the OpenSSL Project by the American Registry for * Internet Numbers ("ARIN"). @@ -1380,19 +1380,23 @@ const X509V3_EXT_METHOD v3_addr = { }; /* - * Figure out whether extension sues inheritance. + * Figure out whether extension uses inheritance. */ int X509v3_addr_inherits(IPAddrBlocks *addr) { int i; + if (addr == NULL) return 0; + for (i = 0; i < sk_IPAddressFamily_num(addr); i++) { IPAddressFamily *f = sk_IPAddressFamily_value(addr, i); + if (f->ipAddressChoice->type == IPAddressChoice_inherit) return 1; } + return 0; } -- 2.20.1