From: Timo Sirainen Date: Sun, 24 Aug 2003 12:49:43 +0000 (+0300) Subject: Don't crash if no protocols were given in config file X-Git-Tag: 1.1.alpha1~4375 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1705fe8eca8d538582705816f3e878da4270c371;p=thirdparty%2Fdovecot%2Fcore.git Don't crash if no protocols were given in config file --HG-- branch : HEAD --- diff --git a/src/master/master-settings.c b/src/master/master-settings.c index caaf144b5e..834d32c2b5 100644 --- a/src/master/master-settings.c +++ b/src/master/master-settings.c @@ -806,6 +806,11 @@ int master_settings_read(const char *path) prev = NULL; for (server = ctx.root; server != NULL; server = server->next) { + if (server->imap->protocols == NULL || + server->pop3->protocols == NULL) { + i_error("No protocols given in configuration file"); + return FALSE; + } if (!settings_is_active(server->imap)) server->imap = NULL; else {