]> granicus.if.org Git - apache/commitdiff
Fix a segfault in mod_cache when url isn't passed
authorIan Holsman <ianh@apache.org>
Mon, 26 Aug 2002 16:41:56 +0000 (16:41 +0000)
committerIan Holsman <ianh@apache.org>
Mon, 26 Aug 2002 16:41:56 +0000 (16:41 +0000)
Submitted by: Kris Verbeeck <Kris.Verbeeck@ubizen.com>

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

CHANGES
modules/experimental/cache_util.c

diff --git a/CHANGES b/CHANGES
index ff8cb84db623d191efc9904bb963cfc0f1a24aaf..3d411b6e203c4a7618eb55dac418faf9be805519 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,5 +1,7 @@
 Changes with Apache 2.0.41
 
+  *) Fix Segfault in mod_cache. [Kris Verbeeck <Kris.Verbeeck@ubizen.com>]
+
   *) Fix a null pointer dereference in the merge_env_dir_configs
      function of the mod_env module. PR 11791
      [Paul J. Reder]
index 19262afaa41ed8d8bc467993be9e82ae1ceaef4e..5bb43922d97f0fdc37f0c2a7e5e62105862bd4d9 100644 (file)
@@ -104,6 +104,9 @@ CACHE_DECLARE(const char *)ap_cache_get_cachetype(request_rec *r,
     const char *type = NULL;
     int i;
 
+    /* we can't cache if there's no URL */
+    if (!url) return NULL;
+
     /* loop through all the cacheenable entries */
     for (i = 0; i < conf->cacheenable->nelts; i++) {
         struct cache_enable *ent =