diff options
author | Stefan Bühler <stbuehler@web.de> | 2013-11-13 11:43:26 +0000 |
---|---|---|
committer | Stefan Bühler <stbuehler@web.de> | 2013-11-13 11:43:26 +0000 |
commit | 6f208cfde145fa392add2fd97cfe3b2152d279b0 (patch) | |
tree | 3b5f9713231a0b151753e0e5c9410917f2828c11 /src/mod_dirlisting.c | |
parent | 6b7240f2d8bdc3838fc6d265bc54e6496e03916d (diff) | |
download | lighttpd-git-6f208cfde145fa392add2fd97cfe3b2152d279b0.tar.gz |
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/mod_dirlisting.c')
-rw-r--r-- | src/mod_dirlisting.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/mod_dirlisting.c b/src/mod_dirlisting.c index cd317ecc..8380c05d 100644 --- a/src/mod_dirlisting.c +++ b/src/mod_dirlisting.c @@ -278,7 +278,7 @@ SETDEFAULTS_FUNC(mod_dirlisting_set_defaults) { if (!p) return HANDLER_ERROR; - p->config_storage = calloc(1, srv->config_context->used * sizeof(specific_config *)); + p->config_storage = calloc(1, srv->config_context->used * sizeof(plugin_config *)); for (i = 0; i < srv->config_context->used; i++) { plugin_config *s; |