From: Giovanni Bechis Date: Tue, 28 Jun 2022 13:06:55 +0000 (+0000) Subject: check apr_sockaddr_info_get return value X-Git-Tag: 2.5.0-alpha2-ci-test-only~278 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8646e07534b4f115496b154f94ac90aa4f8c5b0c;p=thirdparty%2Fapache%2Fhttpd.git check apr_sockaddr_info_get return value bz #66136 git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1902318 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/docs/log-message-tags/next-number b/docs/log-message-tags/next-number index 66c9bdc69b7..a14d11e8a85 100644 --- a/docs/log-message-tags/next-number +++ b/docs/log-message-tags/next-number @@ -1 +1 @@ -10397 +10398 diff --git a/server/listen.c b/server/listen.c index 93158fff7bd..cf2bb3b3763 100644 --- a/server/listen.c +++ b/server/listen.c @@ -881,7 +881,12 @@ AP_DECLARE(apr_status_t) ap_duplicate_listeners(apr_pool_t *p, server_rec *s, duplr->protocol = apr_pstrdup(p, lr->protocol); hostname = apr_pstrdup(p, lr->bind_addr->hostname); port = lr->bind_addr->port; - apr_sockaddr_info_get(&sa, hostname, APR_UNSPEC, port, 0, p); + stat = apr_sockaddr_info_get(&sa, hostname, APR_UNSPEC, port, 0, p); + if (stat != APR_SUCCESS) { + ap_log_perror(APLOG_MARK, APLOG_CRIT, stat, p, APLOGNO(10397) + "unable to control socket status"); + return stat; + } duplr->bind_addr = sa; duplr->next = NULL; duplr->flags = lr->flags;