diff options
author | Glenn Strauss <gstrauss@gluelogic.com> | 2020-12-15 17:35:51 -0500 |
---|---|---|
committer | Glenn Strauss <gstrauss@gluelogic.com> | 2020-12-16 02:00:17 -0500 |
commit | 2565ad1b861db9872f3162248a81fe03178f3528 (patch) | |
tree | a8a5a3f5d379bf03135be1d630d3eabf6541b102 | |
parent | fe5740d5e51d7409427ba472f6447996c1df8b56 (diff) | |
download | lighttpd-git-2565ad1b861db9872f3162248a81fe03178f3528.tar.gz |
[mod_authn_ldap] fix crash (fixes #3048)
(thx mgottinger)
fix crash due to uninitialized memory during config parsing
x-ref:
"Broken LDAP authentication on lighttpd 1.4.56"
https://redmine.lighttpd.net/issues/3048
-rw-r--r-- | src/mod_authn_ldap.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/mod_authn_ldap.c b/src/mod_authn_ldap.c index a7fc9c86..2dd41ef0 100644 --- a/src/mod_authn_ldap.c +++ b/src/mod_authn_ldap.c @@ -232,7 +232,7 @@ SETDEFAULTS_FUNC(mod_authn_ldap_set_defaults) { buffer *b; *(const buffer **)&b = cpv->v.b; mod_authn_add_scheme(srv, b); - ldc = malloc(sizeof(plugin_config_ldap)); + ldc = calloc(1, sizeof(plugin_config_ldap)); force_assert(ldc); ldc->errh = srv->errh; ldc->auth_ldap_hostname = b->ptr; |