Browse Source

[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
master
Glenn Strauss 1 year ago
parent
commit
2565ad1b86
  1. 2
      src/mod_authn_ldap.c

2
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;

Loading…
Cancel
Save