From: Stephan Bosch Date: Wed, 27 Dec 2017 15:31:12 +0000 (+0100) Subject: lib-smtp: server: Prevent calling smtp_server_connection_login() after smtp_server_co... X-Git-Tag: 2.3.1~333 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=52bf7c543e0b853195a92f041973096d77f4059e;p=thirdparty%2Fdovecot%2Fcore.git lib-smtp: server: Prevent calling smtp_server_connection_login() after smtp_server_connection_start(). Added assertion. --- diff --git a/src/lib-smtp/smtp-server-connection.c b/src/lib-smtp/smtp-server-connection.c index 402519313b..810dce001a 100644 --- a/src/lib-smtp/smtp-server-connection.c +++ b/src/lib-smtp/smtp-server-connection.c @@ -1129,6 +1129,7 @@ void smtp_server_connection_login(struct smtp_server_connection *conn, const unsigned char *pdata, unsigned int pdata_len, bool ssl_secured) { + i_assert(!conn->started); i_assert(conn->username == NULL); conn->set.capabilities &= ~SMTP_CAPABILITY_STARTTLS;