]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
Don't crash if no protocols were given in config file
authorTimo Sirainen <tss@iki.fi>
Sun, 24 Aug 2003 12:49:43 +0000 (15:49 +0300)
committerTimo Sirainen <tss@iki.fi>
Sun, 24 Aug 2003 12:49:43 +0000 (15:49 +0300)
--HG--
branch : HEAD

src/master/master-settings.c

index caaf144b5efa07edab001e6e197150c7cce0069a..834d32c2b54c339b4356193b86b42554f46270ee 100644 (file)
@@ -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 {