Browse Source

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
svn/tags/lighttpd-1.4.20
Stefan Bühler 13 years ago
parent
commit
7a64f2f888
  1. 1
      NEWS
  2. 4
      src/stat_cache.c

1
NEWS

@ -58,6 +58,7 @@ NEWS
* fixed mem leak in ssi expression parser (#1753), thx Take5k
* hide some ssl errors per default, enable them with debug.log-ssl-noise (#397)
* do not send content-encoding for 304 (#1754), thx yzlai
* fix segfault for stat_cache(fam) calls with relative path (without '/', can be triggered by x-sendfile) (#1750)
- 1.4.19 - 2008-03-10

4
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);

Loading…
Cancel
Save