[mod_webdav] fix startup crash w/ multiple conds (fixes
(thx flynn)
x-ref:
"lighttpd 1.4.54 segfaults on start in mod_webdav"
@@ -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)
