From: André Malo Date: Thu, 23 Oct 2003 20:07:46 +0000 (+0000) Subject: fix segfault which occured if the filename was not X-Git-Tag: 2.0.48~5 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=fcde605a2205f6c323fa7e5e891d4ea067f1aee1;p=thirdparty%2Fapache%2Fhttpd.git fix segfault which occured if the filename was not set, for example, when processing some error conditions. PR: 23836 Reviewed by: Jeff Trawick, Cliff Woolley git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/APACHE_2_0_BRANCH@101539 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/CHANGES b/CHANGES index 1b92501b39b..a3517fa2e7d 100644 --- a/CHANGES +++ b/CHANGES @@ -1,5 +1,9 @@ Changes with Apache 2.0.48 + *) 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] + *) fix the config parser to support .. containers (no arguments in the opening tag) supported by httpd 1.3. Without this change mod_perl 2.0's sections are broken. diff --git a/STATUS b/STATUS index 1e3bf5e2300..f0061c95f6c 100644 --- a/STATUS +++ b/STATUS @@ -1,5 +1,5 @@ APACHE 2.0 STATUS: -*-text-*- -Last modified at [$Date: 2003/10/22 17:40:26 $] +Last modified at [$Date: 2003/10/23 20:07:45 $] Release: @@ -260,11 +260,6 @@ PATCHES TO BACKPORT FROM 2.1 modules/generators/mod_info.c r1.151 +1: trawick - * mod_include: fix segfault which occured if the filename was not - set, for example, when processing some error conditions. PR 23836. - modules/filters/mod_include.c: r1.288 - +1: nd, trawick, jwoolley - * Set the scoreboard state to indicate logging prior to running logging hooks so that server-status will show 'L' for hung loggers instead of 'W'. diff --git a/modules/filters/mod_include.c b/modules/filters/mod_include.c index 1dc3a2b4a65..a50418e76bb 100644 --- a/modules/filters/mod_include.c +++ b/modules/filters/mod_include.c @@ -155,7 +155,7 @@ static void add_include_vars(request_rec *r, 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 {