From: André Malo Date: Wed, 15 Oct 2003 22:55:48 +0000 (+0000) Subject: fix segfault which occured if the filename was not X-Git-Tag: pre_ajp_proxy~1107 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=57135abe5cbecdadf09d8f4da80547d024175d52;p=thirdparty%2Fapache%2Fhttpd.git fix segfault which occured if the filename was not set, for example, when processing some error conditions. PR: 23836 git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@101461 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/CHANGES b/CHANGES index 19d1203e7a5..b8c0aacd65a 100644 --- a/CHANGES +++ b/CHANGES @@ -2,6 +2,10 @@ Changes with Apache 2.1.0-dev [Remove entries to the current 2.0 section below, when backported] + *) mod_include: fix segfault which occured if the filename was not + set, for example, when processing some error conditions. + PR 23836. [Brian Akins , André Malo] + *) mod_cgid: fix a hash table corruption problem which could result in the wrong script being cleaned up at the end of a request. [Jeff Trawick] diff --git a/modules/filters/mod_include.c b/modules/filters/mod_include.c index 88748f02e0c..f9551c07980 100644 --- a/modules/filters/mod_include.c +++ b/modules/filters/mod_include.c @@ -641,7 +641,7 @@ static void add_include_vars(request_rec *r, const char *timefmt) apr_table_setn(e, "DOCUMENT_PATH_INFO", r->path_info); } apr_table_setn(e, "USER_NAME", LAZY_VALUE); - if ((t = strrchr(r->filename, '/'))) { + if (r->filename && (t = strrchr(r->filename, '/'))) { apr_table_setn(e, "DOCUMENT_NAME", ++t); } else {