Browse Source

[mod_webdav] fix startup crash w/ multiple conds (fixes #2958)

(thx flynn)

x-ref:
  "lighttpd 1.4.54 segfaults on start in mod_webdav"
  https://redmine.lighttpd.net/issues/2958
personal/stbuehler/ci-build
Glenn Strauss 3 years ago
parent
commit
075241c773
  1. 4
      src/mod_webdav.c

4
src/mod_webdav.c

@ -1275,8 +1275,8 @@ SERVER_FUNC(mod_webdav_worker_init)
* across a fork() system call into the child process.
*/
plugin_data * const p = (plugin_data *)p_d;
plugin_config *s = p->config_storage[0];
for (int n_context = p->nconfig+1; --n_context; ++s) {
for (int i = 0; i < p->nconfig; ++i) {
plugin_config *s = p->config_storage[i];
if (!buffer_is_empty(s->sqlite_db_name)
&& mod_webdav_sqlite3_prep(s->sql, s->sqlite_db_name, srv->errh)
== HANDLER_ERROR)

Loading…
Cancel
Save