From: Graham Leggett Date: Tue, 15 Apr 2003 16:01:02 +0000 (+0000) Subject: Fixed a segfault when multiple ProxyBlock directives were used. X-Git-Tag: pre_ajp_proxy~1852 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c3123a7c08a747d41ab4b345e27c121b3a18adc0;p=thirdparty%2Fapache%2Fhttpd.git 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 --- diff --git a/CHANGES b/CHANGES index 72b552264ce..c73c8979c7b 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 fb97a16c052..0b23bf8b569 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))