]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
fix segfault which occured if the filename was not
authorAndré Malo <nd@apache.org>
Thu, 23 Oct 2003 20:07:46 +0000 (20:07 +0000)
committerAndré Malo <nd@apache.org>
Thu, 23 Oct 2003 20:07:46 +0000 (20:07 +0000)
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

CHANGES
STATUS
modules/filters/mod_include.c

diff --git a/CHANGES b/CHANGES
index 1b92501b39beb3fb112107565781b090eab56a76..a3517fa2e7da9fd9b90dca7a13cd70fe4a64bcff 100644 (file)
--- 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 <bakins@web.turner.com>, André Malo]
+
   *) fix the config parser to support <Foo>..</Foo> containers (no
      arguments in the opening tag) supported by httpd 1.3. Without
      this change mod_perl 2.0's <Perl> sections are broken.
diff --git a/STATUS b/STATUS
index 1e3bf5e230083866bc84b5dbee26bdce2c8ffdbb..f0061c95f6c2152f12ee4514cf6abd47dfbd0f07 100644 (file)
--- 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'.
index 1dc3a2b4a658ff75db75657e35d68590f61bce15..a50418e76bbaa4857c683df1da7af0c877f1238b 100644 (file)
@@ -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 {