From feaf0b80721e3864da8761517c572252f35a26eb Mon Sep 17 00:00:00 2001 From: "William A. Rowe Jr" Date: Fri, 15 Mar 2002 16:59:51 +0000 Subject: [PATCH] Another potential ap_server_root_relative failure git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93959 13f79535-47bb-0310-9956-ffa450edef68 --- modules/cache/mod_file_cache.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/cache/mod_file_cache.c b/modules/cache/mod_file_cache.c index 9cdbcf3e80..ac93365cae 100644 --- a/modules/cache/mod_file_cache.c +++ b/modules/cache/mod_file_cache.c @@ -196,10 +196,10 @@ static void cache_the_file(cmd_parms *cmd, const char *filename, int mmap) const char *fspec; fspec = ap_server_root_relative(cmd->pool, filename); - if ((rc = apr_stat(&tmp.finfo, fspec, APR_FINFO_MIN, - cmd->temp_pool)) != APR_SUCCESS) { + if (!fspec || (rc = apr_stat(&tmp.finfo, fspec, APR_FINFO_MIN, + cmd->temp_pool)) != APR_SUCCESS) { ap_log_error(APLOG_MARK, APLOG_WARNING, rc, cmd->server, - "mod_file_cache: unable to stat(%s), skipping", fspec); + "mod_file_cache: unable to stat(%s), skipping", filename); return; } if (tmp.finfo.filetype != APR_REG) { -- 2.50.1