]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
check apr_sockaddr_info_get return value
authorGiovanni Bechis <gbechis@apache.org>
Tue, 28 Jun 2022 13:06:55 +0000 (13:06 +0000)
committerGiovanni Bechis <gbechis@apache.org>
Tue, 28 Jun 2022 13:06:55 +0000 (13:06 +0000)
bz #66136

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1902318 13f79535-47bb-0310-9956-ffa450edef68

docs/log-message-tags/next-number
server/listen.c

index 66c9bdc69b74143fe368c4b6ec818d438123989b..a14d11e8a85453e27c916d595d88f97138ee3a71 100644 (file)
@@ -1 +1 @@
-10397
+10398
index 93158fff7bdbb688c29329fa728980fb3338e49e..cf2bb3b3763fbb7d474e9285bf2e80e1dc26887d 100644 (file)
@@ -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;