From adb78cd04700f417f19eba18bdb4a7e476a2d2ca Mon Sep 17 00:00:00 2001 From: "Tom G. Christensen" Date: Wed, 27 Oct 2021 20:15:30 +0200 Subject: [PATCH 1/7] Fix fallback for missing getaddrinfo() Allow port 0 which is what the testsuite uses. --- crypto/bio/bio_addr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crypto/bio/bio_addr.c b/crypto/bio/bio_addr.c index a80774bbd7..784ee1fecf 100644 --- a/crypto/bio/bio_addr.c +++ b/crypto/bio/bio_addr.c @@ -867,7 +867,7 @@ int BIO_lookup_ex(const char *host, const char *service, int lookup_type, } if (endp != service && *endp == '\0' - && portnum > 0 && portnum < 65536) { + && portnum >= 0 && portnum < 65536) { se_fallback.s_port = htons((unsigned short)portnum); se_fallback.s_proto = proto; se = &se_fallback; -- 2.31.1