From: Ian Holsman Date: Mon, 26 Aug 2002 16:41:56 +0000 (+0000) Subject: Fix a segfault in mod_cache when url isn't passed X-Git-Tag: AGB_BEFORE_AAA_CHANGES~157 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=cd84b43a795022f1f02ecdb2cf6762a3bc93eefe;p=apache Fix a segfault in mod_cache when url isn't passed Submitted by: Kris Verbeeck git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@96532 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/CHANGES b/CHANGES index ff8cb84db6..3d411b6e20 100644 --- a/CHANGES +++ b/CHANGES @@ -1,5 +1,7 @@ Changes with Apache 2.0.41 + *) Fix Segfault in mod_cache. [Kris Verbeeck ] + *) Fix a null pointer dereference in the merge_env_dir_configs function of the mod_env module. PR 11791 [Paul J. Reder] diff --git a/modules/experimental/cache_util.c b/modules/experimental/cache_util.c index 19262afaa4..5bb43922d9 100644 --- a/modules/experimental/cache_util.c +++ b/modules/experimental/cache_util.c @@ -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 =