From: Jeff Trawick Date: Mon, 13 Mar 2006 16:11:18 +0000 (+0000) Subject: merge fix to mod_speling crash when r->filename is not set X-Git-Tag: 2.2.1~70 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=55ccf2b317167a386c6cb6ad7bb1820b17aebc09;p=thirdparty%2Fapache%2Fhttpd.git merge fix to mod_speling crash when r->filename is not set Reviewed by: jerenkrantz, jim git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.2.x@385580 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/CHANGES b/CHANGES index ba0a17c6289..9e5fe7219b2 100644 --- a/CHANGES +++ b/CHANGES @@ -1,6 +1,8 @@ -*- coding: utf-8 -*- Changes with Apache 2.2.1 + *) mod_speling: Stop crashing with certain non-file requests. [Jeff Trawick] + *) SECURITY: CVE-2005-3357 (cve.mitre.org) mod_ssl: Fix a possible crash during access control checks if a non-SSL request is processed for an SSL vhost (such as the diff --git a/STATUS b/STATUS index 44a339edcc7..e051d141f1c 100644 --- a/STATUS +++ b/STATUS @@ -156,11 +156,6 @@ PATCHES PROPOSED TO BACKPORT FROM TRUNK: URL: http://people.apache.org/~wrowe/fixldap_mask.patch +1: wrowe - * mod_speling: Don't crash if r->filename unset. - Trunk version of patch, which applies fine: - http://svn.apache.org/viewcvs?rev=373519&view=rev - +1: trawick, jerenkrantz, jim - * core: Fix up botched status lines (mismatch with r->status or just badly formatted) Trunk version of patch, which applies fine: diff --git a/modules/mappers/mod_speling.c b/modules/mappers/mod_speling.c index a7b9b9ff169..2c427df254e 100644 --- a/modules/mappers/mod_speling.c +++ b/modules/mappers/mod_speling.c @@ -213,7 +213,12 @@ static int check_speling(request_rec *r) } /* We've already got a file of some kind or another */ - if (r->proxyreq || (r->finfo.filetype != 0)) { + if (r->finfo.filetype != 0) { + return DECLINED; + } + + /* Not a file request */ + if (r->proxyreq || !r->filename) { return DECLINED; }