]> granicus.if.org Git - apache/commitdiff
Fix a seg fault in mod_include. When we are generating an
authorRyan Bloom <rbb@apache.org>
Thu, 6 Sep 2001 17:58:28 +0000 (17:58 +0000)
committerRyan Bloom <rbb@apache.org>
Thu, 6 Sep 2001 17:58:28 +0000 (17:58 +0000)
internal redirect, we must set r->uri to "", not a bogus
string, and not NULL.  [Ryan Bloom]

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@90929 13f79535-47bb-0310-9956-ffa450edef68

CHANGES
server/request.c
server/util.c

diff --git a/CHANGES b/CHANGES
index e5874bdcd64fdfafa070fe3885dc8ab6c1654f9c..685a96dc563375ff8ef4615ba3c2d04f97a39227 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,5 +1,9 @@
 Changes with Apache 2.0.26-dev
 
+  *) Fix a seg fault in mod_include.  When we are generating an
+     internal redirect, we must set r->uri to "", not a bogus
+     string, and not NULL.  [Ryan Bloom]
+
   *) Optimized location_walk, so subrequests, redirects and second passes
      now reuse previous section merges on a <Location > by <Location >
      basis, until we mismatch with the original location_walk. 
index bbe115a68e8370dbac43719ddbf2c84d5b996c20..b2ab2d538f114c22beccbe6dd0ba6468e9e70c00 100644 (file)
@@ -1710,7 +1710,7 @@ AP_DECLARE(request_rec *) ap_sub_req_lookup_file(const char *new_file,
          * but it's actually sometimes to impossible to do it... because the
          * file may not have a uri associated with it -djg
          */
-        rnew->uri = "INTERNALLY GENERATED file-relative req";
+        rnew->uri = apr_pstrdup(rnew->pool, "");
 
 #if 0 /* XXX When this is reenabled, the cache triggers need to be set to faux
        * dir_walk/file_walk values.
index 6e38fafbed399de42da5d04aee0f9572035c9669..bcfdb5c85d3d558bfd1e63f61bace4a48d69972e 100644 (file)
@@ -615,7 +615,7 @@ AP_DECLARE(char *) ap_make_dirstr_parent(apr_pool_t *p, const char *s)
     int l;
 
     if (last_slash == NULL) {
-       return NULL;
+       return apr_pstrdup(p, "");
     }
     l = (last_slash - s) + 1;
     d = apr_palloc(p, l + 1);