]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
lib: Check that output max size is non-zero when version specified
authorAki Tuomi <aki.tuomi@dovecot.fi>
Tue, 7 Feb 2017 11:19:17 +0000 (13:19 +0200)
committerGitLab <gitlab@git.dovecot.net>
Tue, 7 Feb 2017 11:22:29 +0000 (13:22 +0200)
Otherwise we try to send version to non-existent output
stream.

src/lib/connection.c

index 08556af688a049ed0d64ccbbfe0076ac13078074..26340ee830dd4b7fb63b9425f416972cae172eb5 100644 (file)
@@ -425,7 +425,8 @@ connection_list_init(const struct connection_settings *set,
                 set->input_full_behavior != CONNECTION_BEHAVIOR_ALLOW);
        i_assert(set->major_version == 0 ||
                 (set->service_name_in != NULL &&
-                 set->service_name_out != NULL));
+                 set->service_name_out != NULL &&
+                 set->output_max_size != 0));
 
        list = i_new(struct connection_list, 1);
        list->set = *set;