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

CHANGES
modules/filters/mod_include.c

diff --git a/CHANGES b/CHANGES
index 19d1203e7a53643629e376086d8855771d3425a9..b8c0aacd65a5092510725a6e387c2443de5427d1 100644 (file)
--- 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 <bakins@web.turner.com>, 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]
index 88748f02e0cfaad609b48e6d4c6b55379ad0492d..f9551c07980ed3fe69e633281b53f27cfd166de0 100644 (file)
@@ -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 {