summaryrefslogtreecommitdiff
path: root/src/stat_cache.c
diff options
context:
space:
mode:
authorStefan Bühler <stbuehler@web.de>2013-11-13 11:43:26 +0000
committerStefan Bühler <stbuehler@web.de>2013-11-13 11:43:26 +0000
commit6f208cfde145fa392add2fd97cfe3b2152d279b0 (patch)
tree3b5f9713231a0b151753e0e5c9410917f2828c11 /src/stat_cache.c
parent6b7240f2d8bdc3838fc6d265bc54e6496e03916d (diff)
downloadlighttpd1.4-6f208cfde145fa392add2fd97cfe3b2152d279b0.tar.gz
lighttpd1.4-6f208cfde145fa392add2fd97cfe3b2152d279b0.zip
fix/silence bugs reported by ccc-analyzer (clang)
These should all be non critical: * memory leaks on startup in error cases (which lead to immediate shutdowns anyway) * http_auth/ldap: passing uninitialized "ret" to ldap_err2string * sizeof(T) not matching the target pointer in malloc/calloc calls; those cases were either: * T being the wrong pointer type - shouldn't matter as long as all pointers have same size * T being larger than the type needed * mod_accesslog: direct use after free in cleanup (server shutdown); could crash before "clean" shutdown * some false positives (mod_compress, mod_expire) * assert(srv->config_context->used > 0); - this is always the case, as there is always a global config block From: Stefan Bühler <stbuehler@web.de> git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.x@2920 152afb58-edef-0310-8abb-c4023f1b3aa9
Diffstat (limited to 'src/stat_cache.c')
-rw-r--r--src/stat_cache.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/stat_cache.c b/src/stat_cache.c
index 3edaeeb6..e995f3b1 100644
--- a/src/stat_cache.c
+++ b/src/stat_cache.c
@@ -713,7 +713,7 @@ int stat_cache_trigger_cleanup(server *srv) {
if (!sc->files) return 0;
- keys = calloc(1, sizeof(size_t) * sc->files->size);
+ keys = calloc(1, sizeof(int) * sc->files->size);
stat_cache_tag_old_entries(srv, sc->files, keys, &max_ndx);