summaryrefslogtreecommitdiff
path: root/src/mod_access.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/mod_access.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/mod_access.c')
-rw-r--r--src/mod_access.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/mod_access.c b/src/mod_access.c
index 39024350..c4774b87 100644
--- a/src/mod_access.c
+++ b/src/mod_access.c
@@ -61,7 +61,7 @@ SETDEFAULTS_FUNC(mod_access_set_defaults) {
{ NULL, NULL, T_CONFIG_UNSET, T_CONFIG_SCOPE_UNSET }
};
- 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;