From: Joshua Rogers Date: Sat, 11 Oct 2025 06:43:39 +0000 (+0800) Subject: bio_sock: fix inverted BIO_lookup return value check X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a276739b94093b3cb4fb22844cc81eff637d5166;p=thirdparty%2Fopenssl.git bio_sock: fix inverted BIO_lookup return value check Signed-off-by: Joshua Rogers Reviewed-by: Saša Nedvědický Reviewed-by: Matt Caswell Reviewed-by: Tomas Mraz (Merged from https://github.com/openssl/openssl/pull/28862) (cherry picked from commit 1c1dcfc269c35e3f8fdbc72b78378aac90a61a81) --- diff --git a/crypto/bio/bio_sock.c b/crypto/bio/bio_sock.c index c4e91af92de..b7b5c64d99a 100644 --- a/crypto/bio/bio_sock.c +++ b/crypto/bio/bio_sock.c @@ -262,7 +262,7 @@ int BIO_get_accept_socket(char *host, int bind_mode) if (BIO_sock_init() != 1) goto err; - if (BIO_lookup(h, p, BIO_LOOKUP_SERVER, AF_UNSPEC, SOCK_STREAM, &res) != 0) + if (BIO_lookup(h, p, BIO_LOOKUP_SERVER, AF_UNSPEC, SOCK_STREAM, &res) == 0) goto err; if ((s = BIO_socket(BIO_ADDRINFO_family(res), BIO_ADDRINFO_socktype(res),