summaryrefslogtreecommitdiff
path: root/src/stat_cache.c
diff options
context:
space:
mode:
authorStefan Bühler <stbuehler@web.de>2008-08-27 15:59:50 +0000
committerStefan Bühler <stbuehler@web.de>2008-08-27 15:59:50 +0000
commit7a64f2f888c9e36f95ac032cfa6c9e488fdaf11a (patch)
tree16d09a212ae470f53d732f1df24d1f39e20546db /src/stat_cache.c
parent5ab6fa6fd2a167267ecae90a35bcd7a1bfbf7836 (diff)
downloadlighttpd1.4-7a64f2f888c9e36f95ac032cfa6c9e488fdaf11a.tar.gz
lighttpd1.4-7a64f2f888c9e36f95ac032cfa6c9e488fdaf11a.zip
fix segfault for stat_cache(fam) calls with relative path (without '/', can be triggered by x-sendfile) (#1750)
git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.x@2299 152afb58-edef-0310-8abb-c4023f1b3aa9
Diffstat (limited to 'src/stat_cache.c')
-rw-r--r--src/stat_cache.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/stat_cache.c b/src/stat_cache.c
index 9325693d..fa94eede 100644
--- a/src/stat_cache.c
+++ b/src/stat_cache.c
@@ -445,7 +445,9 @@ handler_t stat_cache_get_entry(server *srv, connection *con, buffer *name, stat_
/* dir-check */
if (srv->srvconf.stat_cache_engine == STAT_CACHE_ENGINE_FAM) {
if (0 != buffer_copy_dirname(sc->dir_name, name)) {
- SEGFAULT();
+ log_error_write(srv, __FILE__, __LINE__, "sb",
+ "no '/' found in filename:", name);
+ return HANDLER_ERROR;
}
buffer_copy_string_buffer(sc->hash_key, sc->dir_name);