From: David von Oheimb Date: Wed, 31 Jul 2024 17:32:44 +0000 (+0200) Subject: http_server.c: fix checks of error return code in http_server_init() X-Git-Tag: openssl-3.4.0-beta1~35 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5de917ef9c3a3772ad6f06dc6a1072ad752dd484;p=thirdparty%2Fopenssl.git http_server.c: fix checks of error return code in http_server_init() Reviewed-by: Viktor Dukhovni Reviewed-by: Tomas Mraz (Merged from https://github.com/openssl/openssl/pull/25010) (cherry picked from commit 7ec5d5916bc8563935901c027fe56b6644787d10) --- diff --git a/apps/lib/http_server.c b/apps/lib/http_server.c index 4bc2012a1ed..dcb48603713 100644 --- a/apps/lib/http_server.c +++ b/apps/lib/http_server.c @@ -202,8 +202,8 @@ BIO *http_server_init(const char *prog, const char *port, int verb) goto err; acbio = BIO_new(BIO_s_accept()); if (acbio == NULL - || BIO_set_bind_mode(acbio, BIO_BIND_REUSEADDR) < 0 - || BIO_set_accept_name(acbio, name) < 0) { + || BIO_set_bind_mode(acbio, BIO_BIND_REUSEADDR) <= 0 + || BIO_set_accept_name(acbio, name) <= 0) { log_HTTP(prog, LOG_ERR, "error setting up accept BIO"); goto err; }