From: Phil Carmody Date: Tue, 27 May 2014 18:17:34 +0000 (+0300) Subject: auth: master-connection - bail on malformed list X-Git-Tag: 2.2.14.rc1~462 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6094fe2df0a7efe28d45fa37b59755a2bee695e1;p=thirdparty%2Fdovecot%2Fcore.git auth: master-connection - bail on malformed list If master is not communicating to us in a syntax we understand, just ask for it to be unplugged. This changes the behaviour in this error case. Previously, we returned -1, which is TRUE when converted to a boolean, and thus this changes the error semantics, and may be horribly wrong. However, the i_error()s in auth_master_input_line follow the same pattern. Signed-off-by: Phil Carmody --- diff --git a/src/auth/auth-master-connection.c b/src/auth/auth-master-connection.c index 728a1dafa9..ed762390b9 100644 --- a/src/auth/auth-master-connection.c +++ b/src/auth/auth-master-connection.c @@ -527,7 +527,7 @@ master_input_list(struct auth_master_connection *conn, const char *args) list = t_strsplit_tab(args); if (list[0] == NULL || str_to_uint(list[0], &id) < 0) { i_error("BUG: Master sent broken LIST"); - return -1; + return FALSE; } list++;