Skip to content

Commit

Permalink
check apr_sockaddr_info_get return value
Browse files Browse the repository at this point in the history
bz #66136


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1902318 13f79535-47bb-0310-9956-ffa450edef68
  • Loading branch information
bigio committed Jun 28, 2022
1 parent 0b18307 commit 8646e07
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion docs/log-message-tags/next-number
@@ -1 +1 @@
10397
10398
7 changes: 6 additions & 1 deletion server/listen.c
Expand Up @@ -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;
Expand Down

0 comments on commit 8646e07

Please sign in to comment.