From c3123a7c08a747d41ab4b345e27c121b3a18adc0 Mon Sep 17 00:00:00 2001 From: Graham Leggett Date: Tue, 15 Apr 2003 16:01:02 +0000 Subject: [PATCH] Fixed a segfault when multiple ProxyBlock directives were used. PR: 19023 Obtained from: Submitted by: Sami Tikka Reviewed by: git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@99363 13f79535-47bb-0310-9956-ffa450edef68 --- CHANGES | 3 +++ modules/proxy/proxy_util.c | 2 ++ 2 files changed, 5 insertions(+) diff --git a/CHANGES b/CHANGES index 72b552264c..c73c8979c7 100644 --- a/CHANGES +++ b/CHANGES @@ -163,6 +163,9 @@ Changes with Apache 2.1.0-dev Changes with Apache 2.0.46 + *) Fixed a segfault when multiple ProxyBlock directives were used. + PR: 19023 [Sami Tikka ] + *) SECURITY [CAN-2003-0134] OS2: Fix a Denial of Service vulnerability identified and reported by Robert Howard that where device names faulted the running OS2 worker process. diff --git a/modules/proxy/proxy_util.c b/modules/proxy/proxy_util.c index fb97a16c05..0b23bf8b56 100644 --- a/modules/proxy/proxy_util.c +++ b/modules/proxy/proxy_util.c @@ -1015,10 +1015,12 @@ PROXY_DECLARE(int) ap_proxy_checkproxyblock(request_rec *r, proxy_server_conf *c apr_sockaddr_t *uri_addr) { int j; + apr_sockaddr_t * src_uri_addr = uri_addr; /* XXX FIXME: conf->noproxies->elts is part of an opaque structure */ for (j = 0; j < conf->noproxies->nelts; j++) { struct noproxy_entry *npent = (struct noproxy_entry *) conf->noproxies->elts; struct apr_sockaddr_t *conf_addr = npent[j].addr; + uri_addr = src_uri_addr; ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, r->server, "proxy: checking remote machine [%s] against [%s]", uri_addr->hostname, npent[j].name); if ((npent[j].name && ap_strstr_c(uri_addr->hostname, npent[j].name)) -- 2.40.0